Difference between revisions of "Allowing user to run all commands as root without specifying password"

From Notes_Wiki
(Created page with "=Allowing user to run all commands as root without specifying password= We can configure sudo to allow particular user to run all commands as root without supplying user or r...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>
=Allowing user to run all commands as root without specifying password=
=Allowing user to run all commands as root without specifying password=


Line 10: Line 11:
#:</pre>
#:</pre>
#:where &lt;username&gt; must be replaced with proper username. For example, <tt>saurabh ALL=(ALL) NOPASSWD:ALL</tt>
#:where &lt;username&gt; must be replaced with proper username. For example, <tt>saurabh ALL=(ALL) NOPASSWD:ALL</tt>
<yambe:breadcrumb>Sudo configuration</yambe:breadcrumb>

Revision as of 03:38, 9 April 2014

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

Allowing user to run all commands as root without specifying password

We can configure sudo to allow particular user to run all commands as root without supplying user or root password. Following steps can help in achieving this configuration:

  1. Login as root using ssh or 'su -'. We will have to enter root password for this step once.
  2. Run 'visudo' command to edit '/etc/sudoers' file.
  3. Add following line to '/etc/sudoers' file:
    <username> ALL=(ALL) NOPASSWD:ALL
    where <username> must be replaced with proper username. For example, saurabh ALL=(ALL) NOPASSWD:ALL




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