PDA

View Full Version : Help with sudoers and sudolog



llagunocap
16th May 2008, 05:44 AM
I added a user to the sudoers file. I understand I can add another default to log every command run with the command below, but get 'command not found'

[username@hostname ~]$ Defaults logfile=/var/log/sudolog
-bash: Defaults: command not found

Thank you

wneumann
16th May 2008, 05:58 AM
You add that line as a line in your sudoers file, not as a command at the command line.

llagunocap
16th May 2008, 01:54 PM
Thank you. Two additional questions, 1\ how do I make sure the password the user is asked for is his own and not the root password when running a root command and 2\ does the line:

## Delegating permissions
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp

in the sudoers file allow sudoers to modify the file through visudo? In that case, how do I change this permission for certain users not to be able to modify the sudoers file?