That is the problem. When I create an account without password (Or disable the password on an account that has), when I try to install softwares or when I log out the account, it asks for password.. If I type the old password, it says: "invalid password" and isnt possible to do anything on Ubuntu.. Im using Ubuntu 11.10 !

A long time ago I had to format and reinstall Ubuntu because I disable my account. Now, I have my root account with pass, but the problem still exists when I create other account.

Is there a way to fix that??

  • If there's something related to autologin that I missed in my answer let me know... – RobotHumans Mar 19 '12 at 21:01
  • @Victor: If someone's answer was helpful to you, then please consider marking it as the accepted answer so others may more easily find it in the future. This is also a polite way to thank the person answering your question for helping you out. – Danatela Jun 9 '14 at 5:24

Not TOO bad ideas, but still not recommended:

In order to get a no password at login for the gui, you use the autologin options for your login manager lightdm or gdm.
lightdm system settings - user accounts - your username - automatic login
lightdm is the default, so check the gdm docs if you're using that.

In order to get no prompt for keyring you setup an pam script to run after login like this.

In order to get no prompt for sudo you visudo

This can break things, but in some situations it's what you need...

In order to get a no password user at command line/terminal/remote login you:

usermod -G nopasswdlogin username
passwd -d username
passwd -l username

To reset the password of an account if you're locked out

Recovery console - mount as rw - root shell:
passwd username then enter the new password
Reset keyring like this

If you're running an alternate install that boots to a terminal and you want auto-root term login:

You can use mingetty - edit /etc/init/tty1.conf
from this:
exec /sbin/getty 38400 tty1
to this:
exec /sbin/mingetty --autologin USERNAME tty1
from here.


The problem you are having is because passwords are encrypted, and stored in /etc/shadow

When making a password , a empty password is not the same as as a space.

To make a user with a blank password, you generate a password with

perl -e 'print crypt("password","\$6\$v/salt\$") . "\n"'

Be sure to change your salt to a random value

 perl -e 'print crypt("","\$6\$v/ABCDEF\$") . "\n"'

Now add that to /etc/shadow, under the appropriate user name.

Fields in /etc/shadow are separated by colons, : The second field is the password


For details, see




Try using an empty password. Instead of trying to use the previous password, just leave the password field empty - this should work, because as it is impossible to get rid of all these dialogs that ask you for a pass-phrase, disabling the password is usually achieved by setting it to a blank value.


OK, I have to do a little guesswork as the situation of your system is not absolutely clear to me.

1.) An account in Ubuntu has always a password. It is used to validate your authorization to change important configurations of your system. You can only deactivate that the password is asked when booting into your account (autologin).

2.) To make changes to the configuration of your system your account must have admin privileges.

3.) As far as understood you have a root account, which you still can access. Log in, create a new account with proper priviliges and password and you should be fine to go.

  • But how about if I Disable the password of my main account? Ubuntu still asks for a password that doesnt exist! And if I just press Enter (without typing anything) It says (invalid password).. Im not having problems with that, I just wanna know if is there a way to Disable the password and Use Ubuntu without any password.. – Victor Mar 19 '12 at 20:35

I had a similar problem, this worked quite easily for me:

  • open the terminal (ctrl+alt+t)
  • type: passwd (you don't have to type sudo passwd, and shouldn't)
  • You will be prompted to enter the new UNIX password
  • re-enter your password
  • you'll be notified that your password has been updated successfully.
  • you may now carry out super user tasks such as account creation using the new password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.