[sudo-users] sudo and variable expantion: HowTo?
kb2wjw at gmail.com
Thu Jun 8 07:25:43 EDT 2006
If I place in the "sudoers" a line like this (with the actual PID
value at the moment of "visudo"ing):
mortal ALL = /bin/kill -HUP 69
then the "mortal" is able to run the following:
"sudo kill -HUP $(cat /var/run/ntpd.pid)"
Obviously this is a no-go hack since I cannot foresee the PID after
the next reboot...
I wonder how to tell the sudo to aquire the "$(cat
/var/run/ntpd.pid)" expantion result on it's "sudoers" rule line?
Tony mailto:kb2wjw at gmail.com
More information about the sudo-users