码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu技巧之 is not in the sudoers file解决方法

时间:2016-05-24 16:48:16      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

转自:http://www.linuxidc.com/Linux/2010-12/30386.htm

1)进入到root用户下。

2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)编辑/etc/sudoers文件。也就是输入命令"gedit /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"yourName ALL=(ALL) ALL"(这里的yourName是你的用户名),然后保存退出。

4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。

Ubuntu技巧之 is not in the sudoers file解决方法

标签:

原文地址:http://www.cnblogs.com/lilyhomexl/p/5523589.html

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