[sudo-users] Looking for a way to define a PATH statement for commands that have file names as parameters.

Stephen Ambrose sambro2 at us.ibm.com
Tue Feb 12 18:26:04 EST 2008



I have the need to configure a command with a base path defined, such that
users of the sudo command do not have to apply the fully defined path to
the file.

Cmnd_Alias JFERROL_CMDS=/usr/bin/mkdir /etc/*,/usr/bin/cp *
/etc/rc.ugs*,/usr/bin/cp * /etc/run_iman_idsm*,/usr/bin/mv
/etc/run_iman_idsm* /etc/run_iman_idsm*,/usr/bin/mv  /etc/rc.ugs*
/etc/rc.ugs*,/usr/bin/rm /etc/rc.ugs*,/usr/bin/rm
/etc/run_iman_idsm*,/usr/bin/chmod /etc/rc.ugs*,/usr/bin/chmod
/etc/run_iman_idsm*,/usr/bin/chgrp /etc/rc.ugs*,/usr/bin/chgrp
/etc/run_iman_idsm*,/usr/bin/chown /etc/rc.ugs*,/usr/bin/chown
/etc/run_iman_idsm*,/usr/bin/sudoedit /etc/rc.ugs*,/usr/bin/sudoedit
/etc/run_iman_idsm,/usr/bin/sudoedit /etc/run_iman_idsm*,/usr/bin/sudoedit
/etc/services,/usr/bin/mkdir /tcr/*,/usr/bin/cp * /tcr/*,/usr/bin/mv /tcr/*
/tcr/*,/usr/bin/rm /tcr/*,/usr/bin/chmod /tcr/*,/usr/bin/chgrp
/tcr/*,/usr/bin/chown /tcr/*,/usr/bin/sudoedit /tcr/*

The users would like to be able to enter the following from the command
line.

cd /tcr/Team2005/info
sudo chmod 750 config.info

Currently the command sudo fails unless the fully qualified path is
entered.  See below

sudo chmod 750 /tcr/Team2005/info/config.info

Any help is appreciated.


Stephen F. Ambrose
Senior IT specialist ( Unix Administration)
847 805 3708
T/L 208 3708



More information about the sudo-users mailing list