I want to grant it to a specific user A only, how to do that?

link|improve this question

25% accept rate
feedback

2 Answers

up vote 3 down vote accepted

Put:

A ALL=NOPASSWD: ALL

in /etc/sudoers. If you only want to allow sh, change the second ALL to /bin/sh.

link|improve this answer
Is : after NOPASSWD necessary or typo? – wamp Jul 30 '10 at 3:17
1  
It is necessary – Jason Berg Jul 30 '10 at 3:19
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.