[sudo-users] Using wildcards in sudoers file

megadethpaw megadethpaw megadethpaw at hotmail.co.uk
Tue Sep 29 09:51:48 EDT 2009


Hi,
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.
Thanks Jeff 		 	   		  
_________________________________________________________________
Share your photos with Windows Live Photos – Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/


More information about the sudo-users mailing list