Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active March 2, 2019 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iguoli/75dae9851f407e7dbd411a99ee4cd712 to your computer and use it in GitHub Desktop.
Save iguoli/75dae9851f407e7dbd411a99ee4cd712 to your computer and use it in GitHub Desktop.
sudoers文件配置,visudo

配置 sudo 用户

语法

USERS HOSTS=(RUNAS) [NOPASSWD:]COMMANDS

配置无密码用户

cloudera 用户和所有属于 wheel 用户组的用户可以无密码运行任何命令

$ sudo vim /etc/sudoers.d/cloudera

cloudera ALL=(ALL) NOPASSWD:ALL
%wheel ALL=(ALL) NOPASSWD:ALL

查看 man sudoersEXAMPLE 章节,学习更多例子

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment