chmod +x /etc/sudoers
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) 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
本文详细介绍了如何通过编辑/etc/sudoers文件来配置不同用户的sudo权限。包括如何为特定用户或用户组设置执行任意命令的权限,确保系统管理员能够有效地管理和分配sudo权限。

1916

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



