To edit the sudoers file, use the command below.
# visudo
Add the following line.
sysadmin ALL=(ALL) NOPASSWD: ALL
In this example the sysadmin group can now sudo without needing to use a password, but any group can be used.
Note - I use the sysadmin group for Solaris and the wheel group for RHEL & SLES.
Add the user rich to the sysadmin group.
# usermod -G sysadmin man
The -G option adds the user man to the sysadmin group. If you use -g instead the sysadmin group will be added as the primary group.Following the steps above should now give access to sudo without needing to enter a password. If you have any questions or comments please post below.
Simular pages on this blog:
Setup no password sudo on RHEL
No comments:
Post a Comment