Passwordless sudo
·1 min
Analog to the last post, this is another one that fits into the “old brain”-category.
When executing commands as another user, then sudo
is your friend.
Of course, one needs to authenticate correctly. But in day-to-day work it is tedious having to provide the password all the time.
The sudo
-command can be made “passwordless” by using a tool called visudo
.
Just type
sudo visudo
and your favourite editor will open.
Add the following line at the very bottom (important!)
<username> ALL=(ALL) NOPASSWD:ALL
That allows the user with name <username>
to execute commands as root
-user.