Hi.
What OS do you have? Under linux, you need to use sudo
in sudoers file.
Cmnd_Alias SPLUNK = /srv/splunk/bin/splunk restart ! /srv/splunk/bin/splunk clean !
user ALL=(root) NOPASSWD: SPLUNK
You can specify other arguments that are valid in the same Cmnd_Alias line.
Try and tell us about it.
Check out the sudoers man page: