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

генерал Пурпоз kb2wjw at gmail.com
Wed Jun 7 08:47:45 EDT 2006

Hello sudo-users,

  This must be very simple but I can't figure out how to allow a
  mortal to kill one particular process.
  (Namely, I need to allow the ntpd process restared by mortals)

  I put into "sudoers" this one:

  mortal     ALL = /bin/kill -HUP $(cat /var/run/ntpd.pid)

  (This construct works for root on my QNX4 OS)
  The mortals have either "resh" or "ksh" but neither seems to work.
  When a mortal does "sudo kill -HUP $(cat /var/run/ntpd.pid)" it
  fails with ntpd's PID expanded... Neither it works for him if he
  tryes to "sudo kill -HUP here_goes_the_current_ntpd_pid_value".

  Please advise me of the proper way of doing this.
  Thank you in advance.

Best regards,
 Tony                   mailto:kb2wjw at gmail.com

More information about the sudo-users mailing list