命令:visudo 编辑/etc/sudoers文件的专属命令
用法:visudo [-chqsV] [-f sudoers]
命令选项 [root@fp-21 ~]# visudo --help -c, --check # 仅检查模式 -f, --file=sudoers # 指定sudoers文件位置 -h, --help # 帮助文档 -q, --quiet # 启用安静模式,此模式下不显示错误信息 -s, --strict # 启用严格检查sudoers文件 -V, --version # 版本信息 命令实例 # 编辑/etc/sudoers文件的专属命令[root@fp-21 ~]# 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.……# 仅检查模式[root@fp-21 ~]# visudo -c/etc/sudoers: parsed OK# 启用安静模式,此模式下不显示错误信息[root@fp-21 ~]# visudo -q## 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.……# 启用严格检查sudoers文件[root@fp-21 ~]# visudo -s……visudo: /etc/sudoers.tmp unchangedlink 查看 Linux 基础命令
只有注入思想的博客才是好的博客