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

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -