[sudo-users] sudo and variable expantion: HowTo?

Todd C. Miller Todd.Miller at courtesan.com
Thu Jun 8 14:09:03 EDT 2006

In message <20060608135635.GB26755 at evofed.localdomain>
	so spake Matthew Hannigan (mlh):

> Best off writing a wrapper script, say, hupntp, with
> contents
> 	#!/bin/sh
> 	/bin/kill -HUP `cat /var/run/ntpd.pid`
> then in sudoers:
> 	mortal     ALL = /usr/local/bin/hupntp

Another option is to use something like pkill or killall (depending
on the OS) instead to kill a process by name instead of using a pid

 - todd

More information about the sudo-users mailing list