为什么建议使用/etc/sudoers命令编辑visudo文件?下面是该文件的示例:
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.有什么特别的原因吗?
发布于 2013-03-14 14:39:52
因为visudo检查语法并确保它是有效的配置文件;否则您可能会编辑该文件,因此,只因为语法错误,就不能再使用sudo了。
发布于 2013-03-14 14:39:59
这样做的原因是,visudo将在覆盖当前sudoers之前验证该文件没有语法错误。这可以防止你意外地把自己锁在根之外。
https://unix.stackexchange.com/questions/67929
复制相似问题