You are not logged in.

#1 2015-05-13 20:38:46

gay
Member
Registered: 2012-12-16
Posts: 90

[SOLVED] Can not login (from tty) any more after system update

What I did:

pacman -Syvu

There was no unusual output, everything seemed fine, but it was the first system update after some time.

Problem: I am unable to login (from the tty) after reboot. This goes both for root and for other users. The keymap the right one (can be checked as the login process asks for the username first). The login process simply answers

Login incorrect

in the console and records either

pam_unix(login:auth):authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 tuser= rhost= user=<username>

or

FAILED LOGIN 1 FROM tty1 FOR <username>, Authentication failure
FAILED LOGIN 2 FROM tty1 FOR <username>, Authentication failure
...

in the journal, sometimes it logs the former, sometimes it logs the latter, I do not understand how it chooses which form to use.

During the update, there was a journal entry which reads

Registered Authentication Agent for unix-process:15190:426908537 (system bus name :1.190 [/usr/bin/pkttyagent --notify-fd 9 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US)

but this does not appear to be unusual either; I understand that pkttyagent is the agent responsible for handling logins, part of the core/polkit package.

I did not touch any of the polkit configs and verified (chrooting from a livesystem) that they are identical to those in the polkit package as they are installed.

Reinstalling either polkit, pam or systemd does not change anything.
According to pacman -Qkk, there does also not seem to be anything wrong with the packages as they are installed (it only reveals modification time mismatches ).

Obviously pkttyagent does not work properly any more but does so without any trace in the system logs or any other conclusive output. It is generally unfortunate that it nowadays seems to be much easier to launch oneself into space with nothing but a centrifuge than to find the information needed to fix a problem in one's own Linux.

It would be great to see what exactly is happening. There seems to be a pam_debug.so module and it has a man page, but being unfamiliar with pam I do not understand the inculuded example (and my only desire to learn about pam is to get back into my system, otherwise I really don't care about it.)

Note: this is potentially the same problem as in the following threads
https://bbs.archlinux.org/viewtopic.php?id=193462
https://forums.gentoo.org/viewtopic-p-6531397.html
https://www.centos.org/forums/viewtopic.php?t=17227
none of which provide a solution.

Any help is appreciated.

Last edited by gay (2015-05-13 22:30:39)


We are exactly the people our parents always warned us about.

Offline

#2 2015-05-13 20:49:42

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Can not login (from tty) any more after system update

gay wrote:

it was the first system update after some time.

How long exactly since you last updated?

Offline

#3 2015-05-13 20:52:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: [SOLVED] Can not login (from tty) any more after system update

Does it let you change the password when you're chrooted in? If so, can you then login?

Offline

#4 2015-05-13 21:00:48

gay
Member
Registered: 2012-12-16
Posts: 90

Re: [SOLVED] Can not login (from tty) any more after system update

Thanks Head_on_a_Stick & Scimmia.

The last system update was Feb 2014.

I can change everything including passwords when chrooted in; however, the problem remains and login does not work. (Interestingly, sudo works for the non-root users inside the chroot environment. Unfortunately, I can't think of a way to test the actual login process inside the chroot.)

EDIT: Some more information: The journal also occasionally says

getty@tty1.service has no holdoff time, scheduling restart
Stopping getty on tty1..
Starting getty on tty1..

and it started after the uptade and reboot. However, I have no idea what a holdoff time is supposed to be or where to set one for getty.

Last edited by gay (2015-05-13 21:27:15)


We are exactly the people our parents always warned us about.

Offline

#5 2015-05-13 22:30:05

gay
Member
Registered: 2012-12-16
Posts: 90

Re: [SOLVED] Can not login (from tty) any more after system update

By trial and error, I found that the instruction causing the problem was in /etc/pam.d/system-login the instruction

auth     required     pam_shells.so

pam_shells.so checks, according to its man page, whether the shell to be used after login is a "valid login shell" by which the man page means whether it is listed in /etc/shells. My users all had /usr/bin/bash specified as login shell in /etc/passwd while /etc/shells only listed /bin/bash (and various otthers) as valid shells.
Obviously, the specifications matched each other before the system update, so I assume that one of the involved files got overwritten during the update process.

The rest of the system luckily survived the update. Marking the issue solved.

Last edited by gay (2015-05-13 22:35:33)


We are exactly the people our parents always warned us about.

Offline

#6 2015-05-14 06:53:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Can not login (from tty) any more after system update

gay wrote:

The last system update was Feb 2014.

I'm not surprised it's broken...

You cannot leave an Arch system un-updated for over a year and then expect it to work afterwards.

EDIT: Well done getting that fixed!

Last edited by Head_on_a_Stick (2015-05-14 06:54:22)

Offline

Board footer

Powered by FluxBB