Skip to content

Instantly share code, notes, and snippets.

@mjvdende
Created December 30, 2014 08:58
Show Gist options
  • Save mjvdende/9fa6a1264ca9db3f4087 to your computer and use it in GitHub Desktop.
Save mjvdende/9fa6a1264ca9db3f4087 to your computer and use it in GitHub Desktop.
I want to run shell command as sudo without providing a password
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
user ALL=(ALL) ALL
Cmnd_Alias QADATE = /bin/date
Cmnd_Alias CHMOD = /bin/chmod
Cmnd_Alias NTPDATE= /sbin/ntpdate
root, user ALL= NOPASSWD: QADATE, CHMOD, NTPDATE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment