How to switch users without entering password

6

1

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

Torben Gundtofte-Bruun

Posted 2010-03-12T18:32:16.157

Reputation: 16 308

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. http://ubuntuforums.org/showthread.php?t=271674 should get you started on that

– Justin Smith – 2010-03-13T03:23:39.653

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. – Justin Smith – 2010-03-13T03:26:16.390

There are the right answers, you can find out in this link : http://superuser.com/questions/905143/how-to-switch-user-in-putty-login-windows/905158#905158

– jamesxu-e.g. – 2015-04-23T13:09:33.393

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! – Torben Gundtofte-Bruun – 2010-03-14T10:47:08.303

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. – Torben Gundtofte-Bruun – 2010-03-14T10:49:23.603

1

Update: this issue produced a related question: http://superuser.com/questions/120747

– Torben Gundtofte-Bruun – 2010-03-17T13:01:03.500

Answers

3

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.

quack quixote

Posted 2010-03-12T18:32:16.157

Reputation: 37 382

Great answer! That is exactly what I was looking for. I'd like to give another +1 for the "ingroup" tip. Love it! – Torben Gundtofte-Bruun – 2010-03-15T19:24:07.047

And yes, it works just fine in Ubuntu 9.10 too. – Torben Gundtofte-Bruun – 2010-03-15T19:24:43.460

0

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.

txwikinger

Posted 2010-03-12T18:32:16.157

Reputation: 2 467

My /etc/shadow file is completely empty, even though I have root+wife+guest users. I'd like another hint, please. – Torben Gundtofte-Bruun – 2010-03-12T21:53:48.480