You are not logged in.

#1 2016-04-22 20:32:24

cphyc
Member
Registered: 2015-01-06
Posts: 19

Cannot login using PAM

Since my last reboot, it seems I can't manage to login using PAM as my user (either via a TTY, SSH or in GDM and LightDM). I still can connect as root in a TTY. If I log as root, I can then login to my user using su without any problem. If as an user, I then try to login as another user via su, it also works.

Here's the output of journalctl when login through ssh with my credentials:

Apr 22 22:21:36 hostname sshd[30516]: Failed password for username from ::1 port 39350 ssh2

If I try to do a remote root login, I have the following output in journalctl:

Apr 22 22:23:23 hostname sshd[30542]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=::1  user=root
Apr 22 22:23:24 hostname sshd[30542]: Failed password for root from ::1 port 39366 ssh2

As you can see, I have no pam_unix error line when login as a regular user.

When I try to login in a TTY, I get the following message in my journalctl:

Apr 22 22:26:51 hostname login[31292]: FAILED LOGIN 3 FROM tty3 FOR username, Authentication failure

I didn't touch to my PAM configuration personally.

Do you have any idea of what might be the cause of the problem?

Note:
As a hotfix, I activated automatic login in GDM so I don't need to provide my credentials.

Offline

#2 2016-04-23 03:04:30

CT7
Member
Registered: 2016-04-18
Posts: 11

Re: Cannot login using PAM

Can you ssh in as root? Is it only user accounts affected? I'm a little confused as to what you're asking.

You could try doing `pam-auth-update --force` if it's actually a pam issue. If it's an SSH issue, then there's something else you need to fix.

Could it be a group permission issue for SSH?

Edit: So after rereading 5 times, this is what your problem sounds like:

1. You CAN log in as root in a TTY.

2. You CAN'T log in as a normal user in a TTY.

2. You CAN SSH into your machine as a normal user.

3. You CAN'T SSH into your machine as root.

Last edited by CT7 (2016-04-23 03:09:54)

Offline

#3 2016-04-23 15:09:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Cannot login using PAM

Does systemctl indicate any issues with shadow service?
Any chance your user password has been changed or corrupted.  You could try resetting your user password and see if that helps.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB