Created
February 20, 2014 12:21
-
-
Save alameenkhader/9112318 to your computer and use it in GitHub Desktop.
How to add sudo permission to a particular command for a user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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