xxx is not in the sudoers file
9月 20th, 2014,由 frank撰写
当新建一个用户,用sudo可能会发生以下问题:
(在RHEL有这个问题,但Ubuntu和MAC好像没有)
[[email protected] ~]$ sudo service vncserver restart [sudo] password for cisco: cisco is not in the sudoers file. This incident will be reported.
在RHEL中,默认用户没有sudo权限,需要单独配置:
1. 用root登陆或切换到root
2. [[email protected] ~]# vim /etc/sudoers
3. search “root”,添加一行,如下所示:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
cisco ALL=(ALL) ALL <<<