sudo visudo
编辑文件,如下所示:
# /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
# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
本文介绍如何使用visudo命令编辑/etc/sudoers文件,并为特定用户组设置无密码执行sudo命令的权限。此配置适用于系统管理员希望简化某些用户的权限管理场景。
119

被折叠的 条评论
为什么被折叠?



