sudo - Linux: Running a specific command as root -
i need run command "some_user" without being asked password, type:
$ sudo visudo
adding line does work:
some_user all=nopasswd:
but adding line (with specific command "whitelisted") not work:
some_user all=nopasswd: /etc/init.d/"some_service start" $ sudo /etc/init.d/"some_service start"
...will still ask password. doing wrong?
edit: corrected (but still asks password)
some_user all=nopasswd: /etc/init.d/"some_service start" $ sudo /etc/init.d/some_service start
the problem quotes, both on command line , in sudoers
file. quotes make sudo
, shell think there should file in /etc/init.d
named "some_service start
", rather seeing start
argument /etc/init.d/some_service
.
Comments
Post a Comment