wamp Asked: 2010-07-30 18:51:42 +0800 CST2010-07-30 18:51:42 +0800 CST 2010-07-30 18:51:42 +0800 CST How to grant a user to run "sudo sh" without having to typing password? 772 I want to grant it to a specific user A only, how to do that? linux sudo 2 Answers Voted Jason Berg 2010-07-30T19:00:03+08:002010-07-30T19:00:03+08:00 Put this in the sudoers: username ALL=NOPASSWD:/bin/sh And for the sake of teaching a man how to fish, this info is found in the man file for sudo. Just type in 'man sudo' and you'll get all the info you need. Best Answer Matthew Flaschen 2010-07-30T18:59:24+08:002010-07-30T18:59:24+08:00 Put: A ALL=NOPASSWD: ALL in /etc/sudoers. If you only want to allow sh, change the second ALL to /bin/sh.
Put this in the sudoers:
username ALL=NOPASSWD:/bin/sh
And for the sake of teaching a man how to fish, this info is found in the man file for sudo. Just type in 'man sudo' and you'll get all the info you need.
Put:
in
/etc/sudoers
. If you only want to allowsh
, change the secondALL
to/bin/sh
.