dm-tool switch to already logged user.

Asked by lesebas

Hello,

In the man page of dm-tool it's write that switch-to-user will switch directly to the already opened sessions, excepted if the password is required. I'm trying to switch to already logged user but dm-tool always bring me to the greeter. How can I specify to lightdm which sessions do not required password if there are already logged?

Question information

Language:
English Edit question
Status:
Solved
For:
Light Display Manager Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Ancell
Solved:
Last query:
Last reply:
Revision history for this message
Robert Ancell (robert-ancell) said :
#1

You can't specify this. What LightDM does is try and authenticate the user you are switching to (using PAM) and if it is prompted for something then shows the greeter. So in this case your account requires some sort of prompt. You can't find out if this will occur until the authentication is attempted.

Revision history for this message
lesebas (sebdeligny) said :
#2

OK, many thanks for this answer. So do you think I can configure PAM not to prompt for anything if the session is already opened. I remember that old versions of ubuntu (2009 or 2010) were able to switch between opened graphical session without any prompt. I'm no longer using ubuntu but I would like to make this thing possible with my current system (archlinux with XFCE).

Revision history for this message
Best Robert Ancell (robert-ancell) said :
#3

In short, no because each PAM session doesn't know about existing sessions.

Revision history for this message
lesebas (sebdeligny) said :
#4

OK... so I'd suggest to modify the man page to clear this point... Many thanks for your answer.

Revision history for this message
Chris Bainbridge (chris-bainbridge) said :
#5

Yes, so it seems the man page does not explain the difference between switch-to-greeter and switch-to-user very well?

switch-to-greeter: switches to greeter, starts new session

switch-to-user: switches to greeter (unless - rare case - user has no password?), continues session or starts new session

The man page says that the greeter will be started if authentication is required, but it does not make clear when authentication is required.

Also confusing that "switch-to-user username" will bring up the greeter, which asks for the username again.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) said :
#6

In our case we wanted to be able to switch between X sessions without typing a password.

So I opened a question on AskUbuntu and provided an answer. Here it is: https://askubuntu.com/questions/811953/switching-between-two-opened-x-sessions-without-reauthenticating

The current answer there is a working proof-of-concept which basically weakens security similar to https://bugs.launchpad.net/ubuntu/+source/lxsession/+bug/1205384 .

In our case it is what we need and it seems it is what is discussed here.

The answer there also suggest improvement like defining groups of users that allow session switching between them. This would restore security because only users selected by administrator would get the new behavior.

Feedback welcome.

Thank you for your attention.