The situation arise when I want to exchange my used laptop which requires password authentication during login and while issuing sudo commands. The other party wants no password at all. Is that even possible?
1 Answer
To remove login and sudo passwords do the following:
- Login password:
Enable
Automatic Login. (This should allow you to log in automatically into the OS) .Also, remove the password from the keyring by
using an empty string.
An alternative (but I won't advise since I don't know the implications) may be to remove the filelogin.keyringas shown below:$ rm ~/.local/share/keyrings/login.keyring
- Sudo password:
Edit the sudoers file:
$ sudo visudoDisable the
sudopassword:
First, check whether there’s an existing rule with your alias.
(In the filesudoers. I think it is found in/etc/).
If there is, it should look like:YOUR_USERNAME ALL=(ALL) <SOMETHING>:ALL.~$ sudo nano /etc/sudoersIf there isn’t, move to the end of the file and create a new rule there as follows:
YOUR_USERNAME ALL=(ALL) NOPASSWD:ALLSave the changes and exit the editor: Ctrl + O and Ctrl + X.
Voilà! You can now test it by installing an app.
Hope this goes a long way to help you...
sshagent). You can remove the password from the keyring by using an empty password.