Ubuntu技巧之"xxx is not in the sudoers file"解决方法
2010-12-09 00:22
736 查看
原文地址:http://www.linuxidc.com/Linux/2010-12/30386.htm
用sudo时提示"xxx is not in the sudoers file. This incident will be
reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
1)进入超级用户模式。也就是输入"su -"
系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。也就是root用户模式,为root用户到密码也是root。注意这里有"-" ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -”命令将环境变量也一起带过去,就象和root登录一样。
2)添加文件的写权限。也就是输入命令:
3)编辑/etc/sudoers文件。也就是输入命令:
进入编辑模式,找到这一 行:
在它的下面添加:
这里的hadoop是你的用户名,然后保存退出。
4)撤销文件的写权限。也就是输入命令:
用sudo时提示"xxx is not in the sudoers file. This incident will be
reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
1)进入超级用户模式。也就是输入"su -"
su -
系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。也就是root用户模式,为root用户到密码也是root。注意这里有"-" ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -”命令将环境变量也一起带过去,就象和root登录一样。
2)添加文件的写权限。也就是输入命令:
chmod u+w /etc/sudoers
3)编辑/etc/sudoers文件。也就是输入命令:
gedit /etc/sudoers
进入编辑模式,找到这一 行:
root ALL=(ALL) ALL
在它的下面添加:
hadoop ALL=(ALL) ALL
这里的hadoop是你的用户名,然后保存退出。
4)撤销文件的写权限。也就是输入命令:
chmod u-w /etc/sudoers
相关文章推荐
- Ubuntu技巧之"xxx is not in the sudoers file"解决方法
- Ubuntu技巧之"xxx is not in the sudoers file"解决方法
- Ubuntu——"xxx is not in the sudoers file.This incident will be reported" 错误解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- UBuntu中出现xxx is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- [转]Linux之"xxx is not in the sudoers file"解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- "xxx is not in the sudoers file"解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- debian中xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file解决方法(完)
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法