第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > xxx is not in the sudoers file. This incident will be reported.

xxx is not in the sudoers file. This incident will be reported.

时间:2018-08-17 07:55:10

相关推荐

xxx is not in the sudoers file.  This incident will be reported.

sudo,用其他用户的身份执行命令。

运行该命令时,系统首先检查/etc/sudoers,判断该用户是否有执行sudo的权限,在确定有执行权限后,要求输入自己的密码(当前用户),如果密码正确,会以root用户的身份运行后面的命令。

出现xxx is not in the sudoers file. This incident will be reported.一般是提示xxx用户没有执行sudo的权限。

使用visudo命令编辑配置文件,用PgDn翻到大概倒数十几行的位置,复制root那一行,修改成对应的用户,并粘贴。

NOPASSWD表示执行sudo时不再额外输入当前用户的密码,特别注意不是NOPASSWORD,不然保存的时候会报错。:wq!保存并退出,以普通用户登陆并执行命令,不会再提示错误了。

ps:xxx用户相关操作

添加用户:useradd xxx

设置用户密码:passwd xxx

删除用户:userdel xxx

查看用户:userswhow三个都可以

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。