[sudo-users] Using wildcards in sudoers file
megadethpaw at hotmail.co.uk
Tue Sep 29 09:51:48 EDT 2009
I want to be able to give a user permission to use the "/usr/bin/chown" command on solaris using sudo, but only want them to be able to change files or directories under a certain directory, eg "/usr/sap/trans" and any directories underneath.
Examples of commands I want to allow to run are:-
/usr/bin/chown oracle /usr/sap/trans/file1.txt/usr/bin/chown brian /usr/sap/trans/data/filter.csv
In the sudoers file I set up the command to allow to run as this:-
/usr/bin/chown [A-z]* /usr/sap/trans/[A-z]*
This works for the above two commands I do want to use, but it also allows things like this:-
/usr/bin/chown brian /usr/sap/trans/data/filter.csv /etc/passwd
Now as you can see this is a major problem as don't want to allow that, I basically want to make sure that the chown starts with "/usr/sap/trans" is there any way I can do this?
Is there a way to exclude spaces from [A-z] in the suduers line?
Please help as I really need to get this working.
Share your photos with Windows Live Photos – Free.
More information about the sudo-users