wildcard usage in sudoers file

Joe Connellan joe at rsp.com.au
Tue Oct 22 21:18:55 EDT 2002

    I'm trying to setup sudo to allow users to chmod files only under a
certain directory

for example

%user    ALL=/bin/chmod a+w /home/*

is no good because they can do the following
sudo chmod a+w /home/joe/tmp /etc/important_file

does anyone know I good way I can do this using sudo? also getting the
realpath of the argument would be great so I don't have people making
links to get around it also.

Also is there anyway I can use the username as a variable in the sudoers
file eg

%user    ALL=/bin/chmod a+w /home/${USER}/*



More information about the sudo-users mailing list