Tuesday, June 14, 2011

sudo -l not working

sudo -l is a substiitute for profile -l in Solaris.

sudo -l  just prints the commands for which the user has permission to run.

The general way to do it is:

su to the corresponding user and type sudo -l

su user

It will print all the commands the user has perminission to run.

sudo -l   username 
will not work in Linux though profile -l username works for Solaris.

If you get error that the user is not in sudoers or permission denied.

Then it says this particular user is not in the /etc/sudoers.
Check whether  user is present  in any of USER_ALIAS in the /etc/sudoers .
If not add the user to a  appropriate group(USER_ALIAS) in the sudoers file.

For immediate requirement you can also find the  command list by manually tracing  through  the /etc/sudoers file for the user.

No comments:

Post a Comment