Eliminate password entry when running sudo ~~ on Linux PCs!

If you have a privately owned Linux PC, you will want to sudo su. It's a hassle to search many times, so I'll leave it here as a memo.


I think that each individual uses a PC differently. The settings below are for my PC, and depending on the individual, you may have to tamper with the settings, so please do so at your own risk.

Where are you messing around? (Sudoers file containing user information)

$sudo visudo 
#If you get an error such as not recorded in the sudoers file
$Use su to get root privileges.

I think there is the following description in visudo.

# Allow members of group sudo to execute any command
% sudo ALL=(ALL:ALL) ALL

Rewrite it as follows.


important point

Depending on the usage environment, it may be troublesome to start up the PC, so you can log in automatically! I think there are also people. In such a case, turn on the power of the PC and type $ sudo su, and you can do anything, so be careful.

Recommended Posts

Eliminate password entry when running sudo ~~ on Linux PCs!
Stumble on dynamic linking when running binary in Pyinstaller (Linux) Resolved
The day when the flask server running on linux on AWS was semi-persistent (running in the background)
[Linux] When "| (pipe)" cannot be hit on CentOS7