
由于关机前修改过/etc/sudoers文件,强烈怀疑是这个文件引起的,谁可以提供这个文件,这个文件不长,贴在下面就行了,我比对一下文件内容对不对,十分感谢!
代码: 全选
teliute@1-Teacher:~$ sudo cat /etc/sudoers
[sudo] password for teliute:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
什么意思JiangHui 写了:文件权限丢了?
代码: 全选
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
代码: 全选
root ALL=(ALL:ALL) ALL
代码: 全选
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
代码: 全选
root ALL=(ALL) ALL
谢谢你的回复,可能是ubuntu改过了吧,你看前面一楼一人发过ubuntu 12.04的suoder文件,的确多了一个:ALL,应该不是这个文件,不过这个比对软件好像很有用,我拿别的文件看看careone 写了:注意这行:
你的设置ubuntu 10.04 的原始设置代码: 全选
root ALL=(ALL:ALL) ALL
代码: 全选
# /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL) ALL # Allow members of group sudo to execute any command after they have # provided their password # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL # #includedir /etc/sudoers.d # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL
可能你在括号里多了四个字符:代码: 全选
root ALL=(ALL) ALL
:ALL
建议比对用 meld 等专业比对程序,不要用眼睛去比对。
细节处很容易忽略
sudo apt-get install meld
sudo meld /etc/sudoers /etc/sudoers.my