You are not logged in.

#1 2012-12-04 17:57:07

sawyer
Member
Registered: 2012-12-04
Posts: 3

systemd-logind - no session created

I had no problems switching to systemd on my machine, but on another with a similar setup there is the following problem.
After logining in, there is no systemd-logind session, meaning no permissions for automounting etc.  Env. variables XDG_SESSION_ID and XDG_VTNR are empty, loginctl does not show session 1.

$ journalctl -b | grep -i login
systemd[1]: Starting Login Service...
systemd-logind[855]: New seat seat0.
systemd[1]: Started Login Service.
systemd[1]: Starting Login Prompts.
systemd[1]: Reached target Login Prompts.
login[975]: pam_unix(login:session): session opened for user joe by LOGIN(uid=0)
login[975]: LOGIN ON tty1 BY joe
systemd-logind[855]: New session 2 of user sawyer.

In the above, the last line is from my ssh session, but I am missing a similar one for session 1 after the login from tty.

$ loginctl
   SESSION        UID USER             SEAT            
         2       1000 sawyer                              

1 sessions listed.

Note that the user was still logged in when the above was ran.

Any ideas on how to tackle the problem? I followed the wiki to transition to systemd, and as mentioned did the same on my computer before and everything works for me.

Offline

#2 2012-12-05 10:47:54

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: systemd-logind - no session created

sawyer wrote:

... but on another with a similar setup there is the following problem ...

Can you describe the setup please and tell us how you login.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2012-12-05 11:25:34

sawyer
Member
Registered: 2012-12-04
Posts: 3

Re: systemd-logind - no session created

Well the system is up-to-date, apart from a downgraded kernel (3.4.9) because of problems with usb ethernet adapter drivers (I am guessing this should not be an issue, but can try with the newest kernel to eliminate this).
The setup is very basic. There is no display manager, automatic login to virtual console was set up like described in the wiki . Then startx is used to run dwm. But the login problem occurs before startx, and because the env. vars are not set one can't even use $XDG_VTNR -eq 1 like described here ($(tty) = /dev/tty1 works though).
I think logging in manually didn't make a difference but will double-check this when I get the chance. Unfortunantely I don't have physical access to the machine every day.

If you need more information or have suggestions on what to try next please tell.

Offline

#4 2013-03-16 13:47:40

Yannick_LM
Member
Registered: 2008-12-22
Posts: 142

Re: systemd-logind - no session created

Same kind of problem here ...

Setup:

/etc/systemd/system/
├── dbus-org.freedesktop.Avahi.service -> /usr/lib/systemd/system/avahi-daemon.service
├── default.target -> /usr/lib/systemd/system/multi-user.target
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
├── graphical.target.wants
├── multi-user.target.wants
│   ├── avahi-daemon.service -> /usr/lib/systemd/system/avahi-daemon.service
│   ├── netcfg.service -> /usr/lib/systemd/system/netcfg.service
│   ├── remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
│   ├── sshd.service -> /usr/lib/systemd/system/sshd.service
│   └── sshdgenkeys.service -> /usr/lib/systemd/system/sshdgenkeys.service
└── sockets.target.wants
    └── avahi-daemon.socket -> /usr/lib/systemd/system/avahi-daemon.socket

When I log from tty1, logintcl shows noting, but when I log from ssh I do get a
session in loginctl.

I've re-installed arch on a vm just to check what's going on
On the vm, I do get a login session, and the logs say:

$ journalct -b | grep login
Mar 16 13:40:32 arch systemd-logind[164]: Watching system buttons on /dev/input/event3 (Power Button)
Mar 16 13:40:32 arch systemd-logind[164]: Watching system buttons on /dev/input/event4 (Sleep Button)
Mar 16 13:40:32 arch systemd-logind[164]: New seat seat0.
Mar 16 13:40:32 arch systemd-logind[164]: Watching system buttons on /dev/input/event3 (Power Button)
Mar 16 13:40:32 arch systemd-logind[164]: Watching system buttons on /dev/input/event4 (Sleep Button)
Mar 16 13:40:43 arch login[166]: pam_unix(login:session): session opened for user yannick by LOGIN(uid=0)
Mar 16 13:40:43 arch systemd-logind[164]: New session 1 of user yannick.

On my box the logs say:

Mar 16 15:26:49 bermudes systemd-logind[975]: Watching system buttons on /dev/input/event3 (Power Button)
Mar 16 15:26:49 bermudes systemd-logind[975]: Watching system buttons on /dev/input/event5 (Video Bus)
Mar 16 15:26:49 bermudes systemd-logind[975]: Watching system buttons on /dev/input/event0 (Power Button)
Mar 16 15:26:49 bermudes systemd-logind[975]: Watching system buttons on /dev/input/event1 (Lid Switch)
Mar 16 15:26:49 bermudes systemd-logind[975]: Watching system buttons on /dev/input/event2 (Sleep Button)

So for some reason on my box the seat does not even get created ...



edit: solved for me    Turned out I changed /etc/pam.d/login back in 2011 and never merged in with /etc/pam.d/login.pacnew.

For reference, here's the /etc/pam.d/login that did the trick

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login

@sawyer: maybe you should look at your .pacnew files too, or ask for help on #systemd irc channel

Last edited by Yannick_LM (2013-03-16 14:26:04)

Offline

#5 2013-03-18 16:52:30

sawyer
Member
Registered: 2012-12-04
Posts: 3

Re: systemd-logind - no session created

Thank you very much for the advice. I still haven't fixed this problem and it has been bothering me a little all this time. I will take a look as soon as I get access to the machine.
(Although changes from 2011 can't be the reason since the machine is from 2012 it is very possible that I have missed some .pacnew files too)

Offline

Board footer

Powered by FluxBB