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
Add the below line for giving sudo access to apachectl binary without asking for password
Save and quit.
Now test your sudo permissions.
No comments:
Post a Comment