码迷,mamicode.com
首页 > 其他好文 > 详细

is not in the sudoers file解决方法

时间:2014-05-01 22:46:43      阅读:465      评论:0      收藏:0      [点我收藏+]

标签:文件   使用   file   port   ide   解决方法   vim   root   roo   编辑模式   用户名   

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。

下面是修改方法:
1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3) 编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",输入"i"进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"Crytoll ALL=(ALL) ALL"(这里的Crytoll是你的用户名),然后保存(就是先按一 下Esc键,然后输入":wq")退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。

is not in the sudoers file解决方法,布布扣,bubuko.com

is not in the sudoers file解决方法

标签:文件   使用   file   port   ide   解决方法   vim   root   roo   编辑模式   用户名   

原文地址:http://www.cnblogs.com/cysolo/p/3703047.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!