Lubuntu
linux Tips |
No sudo
password |
One of the most annoying things with modern operating systems is the security mentality. Some people don't really care about security as long as they don't keep anything important on the PC and don't keep it running 24hrs. Having to enter a password to change a setting, install a new app, mount a drive..etc can be downright irritating. If I want no security, then why not? To make life easier, this is how you disable the password prompt while sudo'ing. Some apps (such as synaptic) will still prompt you for a password, but most commands e.g terminal commands will not. This involves editing the file /etc/sudoers open an LXTerminal and type; sudo visudo
(The editor may not actually be vi. it could be any editor e.g Nano, If you are root, you can use any editor e.g leafpad /etc/sudoers) Edit these lines when you find them; # User privilege
specification
root ALL=(ALL:ALL) NOPASSWD: ALL # Members of the admin group may gain root privileges %admin ALL=(ALL:ALL) NOPASSWD: ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) NOPASSWD: ALL Save the file (for vi, use ": + "wq") (for Nano, ^O+^X) Logout or reboot. That's it. The mysterious Line At The Bottom In some distros (e.g lubuntu 20.04), there might be a line at the bottom of /etc/sudoers #includedir /etc/sudoers.d
This line looks like a comment because it begins with a hash BUT it is not. It is an include directive that loads whatever files there are in directory /etc/sudoers.d. You should check if there are any files there.e.g /etc/sudoers.d
10-installer If there are, then these files will override any changes made earlier (because the directive is at the bottom of /etc/sudoers). The best thing to do then is to make your changes here instead. e.g, > sudo leafpad
/etc/sudoers.d/10-installer
change%sudo ALL=(ALL)
ALL
to%sudo ALL=(ALL:ALL)
NOPASSWD: ALL
|
More Lubuntu Tips |