Thursday, April 18, 2024
 Popular · Latest · Hot · Upcoming
204
rated 0 times [  204] [ 0]  / answers: 1 / hits: 508089  / 2 Years ago, tue, april 19, 2022, 3:03:56

If I attempt to change my password to nothing by opening "User Accounts", the "Change" button remains greyed out:





How do I change my password to be empty? I know you can set Ubuntu to automatically log you in, but I want my password to be empty, I never want to type in a password to authenticate myself as that user.



I know that there are reasons why this might not be a good idea, but I want to know if it is even possible. I'm using Ubuntu 12.10.


More From » 12.10

 Answers
2

You can't do that using the GUI tool, but you can using the terminal.



  1. First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password.


    To do so, open the sudoers configuration file with sudo visudo, and add the following line to the file, replacing david with your username:


    david ALL=(ALL) NOPASSWD:ALL

    Close the editor to apply the changes, and test the effect on sudo in a new terminal.



  2. Delete the password for your user by running this command:


     sudo passwd -d `whoami`


  3. Follow the steps in this answer in order to make pkexec accept a user with no password. pkexec is used by some applications when root privileges are required.




If you ever get prompted for a password, just type enter and it should work. I've tested this answer with LightDM, the lock screen, sudo, gksu, and it works.


[#31767] Thursday, April 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rtbrbab

Total Points: 461
Total Questions: 126
Total Answers: 117

Location: Saudi Arabia
Member since Fri, Jul 1, 2022
2 Years ago
rtbrbab questions
Fri, May 5, 23, 14:22, 1 Year ago
Tue, Nov 16, 21, 14:41, 2 Years ago
Thu, Mar 23, 23, 20:47, 1 Year ago
Sat, Jun 18, 22, 21:36, 2 Years ago
;