How to Make Linux Less Secure
Tagged with linux on August 2, 2024
Why would you want to make Linux less secure? Sometimes, in specific situations, the security just gets in the way. I’m referring to password authentication only, not the rest of it. Some Linux enthusiasts are going to be angry at me, but I’m going to tell you how you can use Linux without having to enter your password more than once, which is during the login process.
Although I’m focusing on a distribution based on Debian or Ubuntu, some of this applies to other distributions as well. In normal circumstances, when you set up your system, you do everything as a standard user. If you need to use elevated permissions, you can use “sudo” or “su” to raise your authority temporarily when working from the command line.
Each of them requires entering a password. Your user password is used with “sudo” whereas the root password is used with “su”. If no password is set for the root account, “su” won’t even work. I wouldn’t want to bypass the “su” password even if it existed. Staying in an elevated state continuously is simply asking for trouble.
Disabling passwords while using “sudo” and while using the GUI (“Polkit”) should only be considered if you’re the only person with access to your system, and no one can remotely connect to it.
Disable the Sudo Password
You have to use “sudo” to disable the password for your user. From the terminal type:
sudo visudo
Go to the end of the file and enter:
username ALL=(ALL) NOPASSWD: ALL
Replace “username” with your actual username, of course. Exit the terminal and when you reenter the terminal, you will no longer have to use your password with “sudo”
Disable the GUI Password
At the terminal, enter:
sudo -s
Navigate to /etc/polkit-1/rules.d, create a file called “disable.rules”, and enter:
polkit.addRule(function(action, subject) { return polkit.Result.YES; });
Reboot and the next time you use one of the GUI settings that would normally require a password to continue, you won’t be prompted to enter it. This includes the acts of installing and uninstalling software.
Potentially Unsafe
Using “sudo” and the GUI without passwords is potentially unsafe. Never do this in any kind of public environment, or even in a workplace where someone else can gain access to your system.
My computer is in my master bedroom and no one has access to it. Even when someone other than me or Josie (my wife) is in the room, the computer isn’t even powered up unless I’m in the room as well. I don’t have any ports open, and the firewall is engaged. I don’t use any applications to transfer files over Wi-Fi. It’s much quicker and easier to use a USB flash drive, which has both USB-A and USB-C connectors.
Image by [email protected] Larry Ewing and The GIMP, CC0, via Wikimedia Commons
← Previous ArticleNext Article →