Redhat Enterprise Linux 5.10 (No we can't upgrade, please don't ask.)
I have a user, 'tina' who is logged into the system. I need her and user 'lu' to use chmod, chgrp, and chown commands for certain reasons (no they don't know enough to be a security risk, we have daily backups anyway). At first I used sudo nedit /etc/sudoers
to edit the file. Whereon I added this line:
tina,lu ALL=/bin/chmod /bin/chown /bin/chgrp
Then I found I have to use the visudo
command, which I did, and I saved the file without edits.
So I went to test her use of chgrp
and I got an error like "Does not have permission to use this command".
- If I change sudoers do the users need to log off unix shell windows and logon again? The man pages didn't say nor did any pages on Google.
- Do I have to restart the server?
sudo
command you're running to test? It's also worth noting that giving a userchown
effectively gives them unrestricted root on the machine. They have to know how to exploit it, but it's not exceptionally difficult to do that. You might make your sudo command spec more specific so that they can only do certain directories.tina,lu ALL=/bin/chmod,/bin/chown,/bin/chgrp
. Although it's probably not the right thing to do anyway.sudo
command to part of the filesystem without resorting to something like a script that front-endschown
..
but the point still stands that this is probably not what they want to do because it's not exceptionally difficult to exploit this.