Friday, November 28, 2008

How to give sudo permissions

Login to unix box
Use sudo –l to see what sudo commands you have access to.. just for a check.
Then do visudo OR vi /etc/sudoers .You will need root access to edit the files. either you have sudo all access Or you know the root password Or you can su to root with sudo or normal.

Edit the file with correct syntax.
E.g
Add the below line for sudo all access
ALL=ALL
Add the below line for giving sudo access to apachectl binary without asking for password
ALL=NOPASSWD: /apps/apache/bin/apachectl
Save and quit.
Now test your sudo permissions.

No comments: