sudo:在第 27 行附近的 /etc/sudoers 中解析错误

sho*_*key 5 sudo configuration

root@debian:/home/debian8# cat  /etc/sudoers
#
# 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    mail_badpass
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

# 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 
Run Code Online (Sandbox Code Playgroud)

第27行只去掉了一个字符#,原始格式如下。

#includedir /etc/sudoers.d 
Run Code Online (Sandbox Code Playgroud)

我只是删除 # 字符。

root@debian:/home/debian8# ls  /etc/sudoers.d
myRules  README
root@debian:/home/debian8# cat  /etc/sudoers.d/myRules
debian8  ALL=(ALL:ALL) NOPASSWD:ALL
Run Code Online (Sandbox Code Playgroud)

如何解决?

xhi*_*nne 8

#includedir /etc/sudoers.d不是注释,#includedir是指令。哈希符号是其中的一部分。只需重新添加它。