Linux Ubuntu – How to Switch Users Without Entering Password

linuxpasswordsUbuntuubuntu-9.10users

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.)

Best Answer

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.

Related Question