环境:VirtualBox4.1 + RedHat Linux 6
问题:用sudo命令时提示"xxx is not in the sudoers file. This incident will bereported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo命令。
解决:只要修改一下/etc/sudoers文件就行了。
1.进入超级用户模式。也就是输入"su-",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(注:您也可以直接用root登录);
2.添加文件的写权限,因为sudoers这个文件只允许读,不允许写入。输入命令"chmod u+w /etc/sudoers";
3.编辑/etc/sudoers文件。输入命令"vi/etc/sudoers",输入"i"进入编辑模式,找到这一行:"root
ALL=(ALL) ALL",在这行下面添加"xxxALL=(ALL) ALL"(这里的xxx是你的用户名),然后按Esc键,输入":wq",保存退出;
4.撤销文件的写权限,还原文件的读写状态。输入命令"chmod u-w /etc/sudoers"。
参考资料:http://apps.hi.baidu.com/share/detail/33864699
分享到:
相关推荐
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
...
培训学校入股合同.pdf
linux不能使用sudo命令解决方案,username is not in the sudoers file
问题假设用户名为:ali如果用户名没有超级用户权限,当输入 sudo + 命令 时, 系统提示: 代码如下:ali is not in the sudoers file. This incident will be reported.解决1. 进入超级用户模式。即输入”su”,系统...
使用sudo提权时出现:xx用户不在 sudoers 文件中。
此文档详细介绍在ubuntu系统下由于某种操作(修改了/usr/目录下某些文件的权限,修改了用户的名字等)导致sudoers文件不可用时的解决方法。非常有用。
最新Mac OS --sudo 工具,安装以后,Mac 可以执行sudo命令
Ansible-ansible-sudoers.zip,控制默认/etc/sudoers文件和包含的文件/目录的配置。,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任务自动化。
在类似Debian的系统中管理sudoers和sudoers.d。 要求 没有任何 变数 sudoers_sudoers : /etc/sudoers文件声明 sudoers_sudoers.defaults :[默认:请参见defaults/main.yml ]:默认配置选项 sudoers_sudoers.host_...
sudoers文件编辑和使用
ansible-sudoers:控制默认etcsudoers文件和包含的文件目录的配置
sudo: error in /etc/sudo.conf, line 19 while loading plugin "sudoers_policy" sudo: unable to load /usr/libexec/sudo/sudoers.so: libz.so.1: cannot open shared object file: No such file or directory ...
树莓派使用的sudoers文件,当调用管理员权限出问题时,很有可能是该文件出现了问题,一个可行的方法就是使用另一个Linux系统替换该文件。
IT项目这是-Satwik 和Sulav 为福布斯大学网页设计竞赛而进行的私人项目。
#2....3./etc/sudoers文件设置为允许用户在不输入该用户的密码的情况下使用所有...## the root user, without needing the root password. ##该文件允许特定用户像root用户一样使用各种各样的命令,而不需要root用户的密码
libssl.so.10缺失库文件的解决办法,error while loading shared libraries :libssl.so.10:cannot open shared object file:No such file or directory
主要介绍了Linux系统添加普通用户到 sudoers 文件的方法,在文章给大家补充Debian将普通用户添加到sudoer文件的方法,感兴趣的朋友一起看看吧
sudo修复