Score:0

Authenticating via SSSD but Unix Auth logs a failure

ae flag

I have WinAD authentication working on all 20+ of our Debian 11 servers. We also have a handful of CentOS/Rocky servers working correctly. Login to one of the Debian machines causes the following logs:

Mar 22 07:53:06 pcap-1 sshd[1107]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=172.18.224.2  user=ross
Mar 22 07:53:06 pcap-1 sshd[1107]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=172.18.224.2 user=ross

I've modified nsswitch.conf (after my baseline config of the whole server, the 'sss' is generated to be at the end of each line shown below, I manually moved them to the front)

passwd:         sss files systemd
group:          sss files systemd
shadow:         files
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       sss nis
automount:      sss

We want unix auth to still be in place in the event we need to login with our local admin account, but still allow AD users in.

Why is unix auth being attempted before sss?

Score:0
in flag

The clue is actually in the (very helpful) log you posted: pam_unix and pam_sss. So these logs come from the PAM system.

If you look in /etc/pam.d you’ll see various files configuring how logins work, and I suspect that in many of them, pam_unix will appear before pam_sss.

It’s been a long time since I played with PAM, so I won’t try to advise you here except to caution you that changing these files without really understanding them could prevent you from logging in.

There’s nothing inherently wrong with the system trying the UNIX login before AD. I’m not sure that reordering them will provide any practical advantage, except to suppress a (harmless) message – until you try to login with a UNIX account, in which case you’ll get a (harmless) AD login failure message first.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.