ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle is not in the sudoers file

oracle is not in the sudoers file

原创 Linux操作系统 作者:dbahaoyuan 时间:2015-02-04 11:24:01 0 删除 编辑
在Linux操作系统中,以普通用户使用sudo时,常常会出现这个报错,如:
[oracle@dbahaoyuan ~]$ sudo ifconfig
[sudo] password for oracle:
oracle is not in the sudoers file.  This incident will be reported.
[oracle@dbahaoyuan ~]$
报错给出原因是用户oracle不在sudo的配置文件中,oracle用户无法使用sudo;
 
首先:
以root用户修改/ete/sudoer,在root ALL=(ALL)    ALL  行下添加 oracle ALL=(ALL)    ALL
[root@dbahaoyuan etc]# chmod u+w sudoers
[root@DBA2 etc]# vi sudoers
添加 oracle    ALL=(ALL)    ALL
 
将sudoer属性改回原值:
[root@dbahaoyuan etc]# chmod u-w sudoers
[root@dbahaoyuan etc]# ll sudoers
-r--r----- 1 root root 3402  AUG  1 11:39 sudoers
 
再试试sudo的命令,可以使用了;
[oracle@dbahaoyuan ~]$ sudo ifconfig
[sudo] password for oracle:


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30031456/viewspace-1425947/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-11-21

  • 博文量
    33
  • 访问量
    142214