Understanding sudo configuration syntax

From Notes_Wiki
Revision as of 04:20, 10 November 2012 by Saurabh (talk | contribs) (Created page with "=Sudo configuration syntax= Lines in sudo configuration uses following format: <pre> <username> or <group> <machine> = [(<user>)] [NOPASSWD] :<command1> [, <command2> ...] </...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sudo configuration syntax

Lines in sudo configuration uses following format:

<username> or <group> <machine> = [(<user>)] [NOPASSWD] :<command1> [, <command2> ...]

For example:

saurabh barjatiya = (root) NOPASSWD: /usr/sbin/wireshark, /usr/sbin/tcpdump

will allow user 'saurabh' to run '/usr/sbin/wireshark' and '/usr/sbin/tcpdump' commands on machine 'barjatiya' without supplying password as root user.