Skip to content

Instantly share code, notes, and snippets.

@liuxd
Created August 28, 2017 22:42
Show Gist options
  • Select an option

  • Save liuxd/e0e316ec51b42d4a8e210259ae39d0aa to your computer and use it in GitHub Desktop.

Select an option

Save liuxd/e0e316ec51b42d4a8e210259ae39d0aa to your computer and use it in GitHub Desktop.

The configure file is /etc/sudoers.

For all the group of admin:

%admin ALL=(ALL) NOPASSWD: NOPASSWD ALL

For the user of liuxd:

liuxd ALL=(ALL) NOPASSWD: ALL

For the user of liuxd and just several commands:

liuxd ALL = NOPASSWD: /usr/bin/abc.sh, /usr/sbin/adduser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment