Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
I want to grant it to a specific user A only, how to do that?
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:
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.
Required, but never shown