Difference between revisions of "Understanding sudo configuration syntax"

From Notes_Wiki
(Created page with "=Sudo configuration syntax= Lines in sudo configuration uses following format: <pre> <username> or <group> <machine> = [(<user>)] [NOPASSWD] :<command1> [, <command2> ...] </...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>
=Sudo configuration syntax=
=Sudo configuration syntax=


Line 11: Line 12:
</pre>
</pre>
will allow user '<tt>saurabh</tt>' to run '<tt>/usr/sbin/wireshark</tt>' and '<tt>/usr/sbin/tcpdump</tt>' commands on machine '<tt>barjatiya</tt>' without supplying password as root user.
will allow user '<tt>saurabh</tt>' to run '<tt>/usr/sbin/wireshark</tt>' and '<tt>/usr/sbin/tcpdump</tt>' commands on machine '<tt>barjatiya</tt>' without supplying password as root user.
<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>

Revision as of 03:38, 9 April 2014

<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>

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.




<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>