I'm a newbie running Ubuntu 9.10. I have two users (wife and me), and each user's screensaver is set to lock so that on wakeup, we get to choose which user's desktop to go to. However, Ubuntu requires a password, so this is pretty tedious.

I'd like to switch users without entering any password. I know about this trick that works for the boot login, but it doesn't deal with multiple users.

Is it possible to set empty passwords for users in Ubuntu, or skip the password in other ways?

(I'm expecting real Linux users to suggest that passwordless users must not get any rights and there be an admin user with a strong password. Yes, you're right. But that's not what this question is about. Thanks.)

  • A little outside the box here: you could have two automatic logins at once, each on their own independent display. You would hit Ctl-Alt-F7 to switch to one, Ctl-Alt-F8 to switch to the other. ubuntuforums.org/showthread.php?t=271674 should get you started on that Mar 13, 2010 at 3:23
  • The problem with the "no password" route, is that this makes your machine easy to break into, and all of us have to deal with the spam that is produced using poorly secured computers - half of the traffic on the internet is spam, most of it from people who don't even know they are running a spambot. Mar 13, 2010 at 3:26
  • Security? It's a computer at my home, not at the library. When I see a password prompt (Windows Vista, Windows 7, any Linux) then I enter the password, end of story. What I want to achieve is to NOT have to enter the password when switching users. If there's a better way, please provide it as an answer - much appreciated! Mar 14, 2010 at 10:47
  • Diplays? I only have one physical monitor but gather from your comment that Linux has more meanings to this. The "wife acceptance factor" means that Ctrl-Alt-something is not an option. "Wake-from-screensaver" should result in "choose user", preferably with the mouse or arrows+Enter. Mar 14, 2010 at 10:49
  • 1
    Update: this issue produced a related question: superuser.com/questions/120747 Mar 17, 2010 at 13:01

2 Answers 2


There is a way to achieve password-less logins in GDM by monkeying with GDM and/or PAM configurations. This is not the same as setting an empty password, or having GDM auto-login a given user; and it only works in GDM -- logging in on the text console, or via SSH, or using sudo, still requires a password.

This is from this recent post under an older UbuntuForums HowTo on enabling passwordless logins in GDM. I've used this method before with success, under Ubuntu 9.04; I don't know if it's still viable for Ubuntu 9.10.

Adding this line to the beginning of /etc/pam.d/gdm (make a backup!) tells PAM that the foo user doesn't need to give a password to login to GDM:

auth   sufficient   pam_succeed_if.so user = foo

If your users are all in some group (say, group family), you could give this capability to all family users with this line instead:

auth   sufficient   pam_succeed_if.so user ingroup family

This works on the basic GDM login screen; I'm not sure if it will work with the coming-back-from-screensaver.

  • Great answer! That is exactly what I was looking for. I'd like to give another +1 for the "ingroup" tip. Love it! Mar 15, 2010 at 19:24
  • And yes, it works just fine in Ubuntu 9.10 too. Mar 15, 2010 at 19:24

Did you try link text. This is a little dangerous if you don't know how to handle the shadow password file, however, probably the simplest way to do what you want.

  • My /etc/shadow file is completely empty, even though I have root+wife+guest users. I'd like another hint, please. Mar 12, 2010 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .