Skip to content

Instantly share code, notes, and snippets.

@alameenkhader
Created February 20, 2014 12:21
Show Gist options
  • Save alameenkhader/9112318 to your computer and use it in GitHub Desktop.
Save alameenkhader/9112318 to your computer and use it in GitHub Desktop.
How to add sudo permission to a particular command for a user
How to add sudo permission to a particular command for a user
Following example illustrates how to add apache restart access to the user nih
Login as root user
Then open visudo by typing in
visudo
Add the command to the end of the file
#username# ALL= NOPASSWD: #command#
nih ALL= NOPASSWD: /etc/init.d/httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment