[root@charonmirandam]#echo 'mirandamALL=(ALL)NOPASSWD:ALL' >> /etc/sudoers
[root@charonmirandam]# exit
exit
在按deepwhite兄的一篇题为Fedora 8 安装指南(全)的文中如上所述的方法,将mirandam换成我的用户名在root下成功实现了上述命令后,无论在root下还是普通用户下运行sudo命令都会出现如下之类的错误,请教各位大虾是什么原因阿?:0w223dc
[root@localhost ~]# sudo yum install kmod-nvidia
>>> sudoers file: syntax error, line 93 <<<
sudo: parse error in /etc/sudoers near line 93
[root@localhost ~]# sudo /sbin/reboot
>>> sudoers file: syntax error, line 93 <<<
>>> sudoers file: syntax error, line 94 <<<
>>> sudoers file: syntax error, line 95 <<<
sudo: parse error in /etc/sudoers near line 93
bonusone 于 2011-02-25 11:50:56发表:
我配置了也说没效。挺郁闷的啊
winlinux 于 2008-06-15 21:22:12发表:
太感谢deepwhite了!说的如此明白,我终于按你说的搞定了,心情舒畅!:0wmjh(1
相思爱文 于 2008-06-15 21:14:03发表:
用vi手动改,先好好学下vi,这是基本的编辑工具。
deepwhite 于 2008-06-15 20:33:46发表:
你弄错了。正确的做法是编辑完之后先按下Esc,然后输入冒号,最后再输入指令。即输入的内容为“:wq”(没有引号,但是要有冒号)。w为保存,q为退出。如果不想保存直接退出为q!。
你没有输入冒号,而且用的是大写的Q,所以进入了x mode (:) ,也就是另外的一个编辑器。
winlinux 于 2008-06-15 19:45:45发表:
谢deepwhite!再问个很菜的问题,据说保存退出visudo命令只要输入“Q”就可以了,为什么我输入了出现了如下状况:
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
Entering Ex mode. Type "visual" to go to Normal mode.
:
我该如何保存退出呢?太菜了,麻烦说清楚些!:0wmjh(1
deepwhite 于 2008-06-15 19:24:45发表:
仔细看看这里:
http://www.linuxdiyf.com/bbs/viewthread.php?tid=68725&highlight=
使用visudo进去以后找到mirandamALL=(ALL)NOPASSWD:ALL将这句话删除就好了。
PS :root身份执行命令就不用加sudo了。
winlinux 于 2008-06-15 19:21:21发表:
求教如何使用visudo命令改回去