Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 4 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.

share|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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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