I have just upgraded to Ubuntu 18.04 from 16.04 and I appear to have lost my ability to login without a password. This is something that I used in 16.04 for a media player computer that I have in my living room.

This question appears to have been asked before, and has been marked as a duplicated here:

How can I log in to Ubuntu 18.04 without a password? Setting auto login doesn't work

However, the answers are about auto-login and I do not want this. I want to get a login dialog with a user name that requires no password, not one that auto-logins in on boot. This is so that I can choose which account to login in to (I have one account for playing media and my own "real" account which I use for sys admin), or so that I can choose session types (my media account mostly uses kodi, but sometimes I need a desktop).

This was possible with previous versions of Ubuntu:


Has it been lost in 18.04?


I do exactly this myself, and upgraded the box from 16.04 to 18.04 a few weeks ago - with zero ill effects.

Run sudo passwd -d username to delete the password for this user.

That should allow you to login without entering a password, and works fine for me on 18.04

  • 1
    Yes, I guess this will be the way to go, although I was a bit wary of this because it will effect all authentication, including over a network. I guess the risk are relatively low for a media box, but still. – Phil Lord Dec 15 '18 at 23:19
  • By default ssh disallows login with empty password, so it's only accessible on the local console. You can verify that PermitEmptyPasswords is set to no in /etc/ssh/sshd_config. – vidarlo Dec 15 '18 at 23:24
  • Yes, I did this for ssh. – Phil Lord Dec 15 '18 at 23:48
  • Once you have done this, though, there doesn't appear to be anyway to change the session (from gnome->kodi, or kodi->gnome), since the option to do this is at the password dialog which no longer appears (as soon as you click on the user, you login, not as previously requiring another click). – Phil Lord Dec 15 '18 at 23:50
  • Am I doing it wrong? >>> ~$ sudo useradd testpasswd >>> ~$ sudo passwd -d testpasswd >>> passwd: password expiry information changed. >>> ~$ su testpasswd >>> Password: [press Enter] >>> su: Authentication failure – Cosmologicon Dec 1 '19 at 17:58

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.