欢迎光临散文网 会员登陆 & 注册

Linux初级——xxx is not in the sudoers file

2018-06-25 16:01 作者:啷个里格朗郎郎  | 我要投稿

这是一篇修改错误的,从文件夹里找到,感觉挺有意义,为防止丢失,决定写下来。

当Linux系统中出现以下错误,可以试着修改,本人修改成功了。

xxx is not in the sudoers file

$sudo root;切换到root

#ls -l /etc/sudoers;查看权限

-r--r--

#chmod 777 /etc/sudoers;修改为可执行

#ls -l /etc/sudoers

-rwxrwxrwz

#gedit /etc/sudoers

root ALL = (ALL)  ALL

user ALL = (ALL)  ALL;允许用户user执行sudo命令

%user ALL =(ALL)  ALL;允许用户组user执行sudo命令

user ALL = (ALL) NOPASSWD:ALL;允许用户user执行sudo命令,不需要密码

#chmod u-w /etc/sudoers;撤销sudoers文件写权限


Linux初级——xxx is not in the sudoers file的评论 (共 条)

分享到微博请遵守国家法律