Difference between revisions of "Allowing user to run all commands as root without specifying password"
From Notes_Wiki
m |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Sudo configuration]] > [[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: | 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: | ||
Line 18: | Line 17: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Sudo configuration]] > [[Allowing user to run all commands as root without specifying password]] |
Latest revision as of 13:38, 14 July 2022
Home > CentOS > CentOS 6.x > Sudo configuration > 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:
- Login as root using ssh or 'su -'. We will have to enter root password for this step once.
- Run 'visudo' command to edit '/etc/sudoers' file.
- 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
The same can be configured for a group using %<group-name> instead of username. For example %admin ALL=(ALL) NOPASSWD:ALL
Home > CentOS > CentOS 6.x > Sudo configuration > Allowing user to run all commands as root without specifying password