How to switch users without entering password
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.
Murray Furtado
Hello, world! I enjoy using my experience to help others. That is why I am active at a number of other sites in the StackExchange network on topics that interest me. I'm something of a Swiss army knife both professionally and in private, able to juggle a wild variety of things at once. I've worked in every kind of business that uses software. I'm also very good with tools, both IT and mechanic. Whether you need software design or assembling some IKEA furniture, I'm your man for the job. I'm generally soft-spoken but driven by clear principles. I'm a twin, I've lived in five countries, I speak four languages fluently and two more embarrassingly. Also, being a father routinely develops my patience which is useful for moderating on StackExchange too. To learn more about me, see my Google+ profile.
Updated on September 17, 2022Comments
-
Murray Furtado over 1 year
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.)
-
Justin Smith about 14 yearsA 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
-
Justin Smith about 14 yearsThe 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.
-
Murray Furtado about 14 yearsSecurity? 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!
-
Murray Furtado about 14 yearsDiplays? 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.
-
Murray Furtado about 14 yearsUpdate: this issue produced a related question: superuser.com/questions/120747
-
jamesxu-e.g. about 9 yearsThere are the right answers, you can find out in this link : superuser.com/questions/905143/…
-
-
Murray Furtado about 14 yearsMy /etc/shadow file is completely empty, even though I have root+wife+guest users. I'd like another hint, please.
-
Murray Furtado about 14 yearsGreat answer! That is exactly what I was looking for. I'd like to give another +1 for the "ingroup" tip. Love it!
-
Murray Furtado about 14 yearsAnd yes, it works just fine in Ubuntu 9.10 too.