Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
login Auth failed für Windows-AD User trotz SSSD AuthSuccess
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2237
Location: My own world! I and Gentoo!

PostPosted: Thu May 02, 2024 11:40 am    Post subject: login Auth failed für Windows-AD User trotz SSSD AuthSuccess Reply with quote

Hallo zusammen,

vielleicht hat jemand eine Idee.

Ich hab volle Kontrolle über einen Linux Host, der eine Handvoll User gegen eine recht umfangreiche Windows AD authentifizieren soll. Alle User haben sowieso einen AD User und warum nicht.
Ich kann mich mit meinem AD Konto per su -l auch anmelden (sogar von einem User aus, also mit password). Soweit funktioniert das.
Aber der selbe Trick über sshd oder am Terminal/GUI resultiert in ein Login incorrect.

Jetzt aber das seltsame. SSSD sagt das alles in Ordnung wäre
Code:
May  2 13:16:30 hostname sshd[5382]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.123.100 user=max.steel@ad.company.tld
May  2 13:17:04 hostname login[4664]: pam_sss(login:auth): authentication success; logname=LOGIN uid=0 euid=0 tty=/dev/tty2 ruser= rhost= user=max.steel@ad.company.tld


login allerdings dann trotzig...
Code:
May  2 13:16:31 hostname sshd[5380]: error: PAM: Authentication failure for max.steel@ad.company.tld from 192.168.123.100
May  2 13:17:06 hostname login[4664]: FAILED LOGIN (1) on '/dev/tty2' FOR 'max.steel@ad.company.tld', Authentication failure


Kann mich hier jemand richtig lenken. Bis auf pam_mkhomedir hab ich die pam Configuration auch nicht verändert.
Heißt installiert ist pambase mit +sssd
Code:
$ eix pambase
[I] sys-auth/pambase
     Verfügbare Versionen:   20220214^b 20240128^b **999999999*l^b {caps debug elogind gnome-keyring homed minimal mktemp +nullok pam_krb5 pam_ssh +passwdqc pwhistory pwquality securetty selinux +sha512 sssd systemd yescrypt}
     Installierte Versionen: 20240128^b(21:42:46 29.04.2024)(caps elogind mktemp nullok passwdqc sha512 sssd -debug -gnome-keyring -homed -minimal -pam_krb5 -pam_ssh -pwhistory -pwquality -securetty -selinux -systemd -yescrypt)
     Startseite:             https://github.com/gentoo/pambase
     Beschreibung:           PAM base configuration files


Die Authentifizierung gegen die AD funktioniert auch mit ldapsearch -Y GSSAPI einwandfrei, zum einen als root mit dem Kerberos Credentials für das Computer-Objekt, als auch mit einem generierten kinit max.steel@MY.DOMAIN.TLD.
So gesehen funktioniert nur die Übergabe des Erfolges vom PAM Modul an die base bzw den login nicht wie gewollt.

Hier noch die pam system-auth file... ich vermute den Fehler hier... verstehe aber nicht genug darüber... nur dass die Reihenfolge wichtig ist, und sufficient soviel heißt wie "wenn ein required fehlschlägt dann hilft ein sufficient dabei dass es doch geht"
Code:
auth            required        pam_env.so
auth            [default=1 ignore=ignore success=ok]    pam_usertype.so isregular
auth            [default=3 ignore=ignore success=ok]    pam_localuser.so
auth            requisite       pam_faillock.so preauth
auth            sufficient    pam_unix.so nullok
auth            [default=die]   pam_faillock.so authfail
auth            sufficient      pam_sss.so forward_pass
auth            optional        pam_cap.so
auth            required        pam_deny.so
account         required        pam_unix.so
account         required        pam_faillock.so
account         sufficient      pam_localuser.so
account         sufficient      pam_usertype.so issystem
account         [default=bad success=ok user_unknown=ignore] pam_sss.so
account         required        pam_permit.so
password        required        pam_passwdqc.so config=/etc/security/passwdqc.conf
password        sufficient      pam_unix.so try_first_pass use_authtok nullok sha512 shadow
password        sufficient      pam_sss.so use_authtok
password        required        pam_deny.so
session         required        pam_limits.so
session         required        pam_env.so
session         required        pam_mkhomedir.so skel=/etc/skel umask=0022
session         optional        pam_mktemp.so
session         required        pam_unix.so
session         optional        pam_sss.so


und die system-login ist original.
Code:
auth            required        pam_shells.so
auth            required        pam_nologin.so
auth            include         system-auth
account         required        pam_access.so
account         required        pam_nologin.so
account         required        pam_time.so
account         include         system-auth
password        include         system-auth
session         optional        pam_loginuid.so
session         required        pam_env.so envfile=/etc/profile.env
session         optional        pam_lastlog.so silent
session         include         system-auth
session         optional        pam_motd.so motd=/etc/motd
session         optional        pam_mail.so
-session        optional        pam_elogind.so


Wie gesagt, ist die default config-file mit dem Zusatz um mkhomedir.

Ob die sssd config file wichtig genug ist für euch... Weiß ich nicht. Aber der Post ist schon lang genug ;)

Habt ihr eine Idee?
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1928
Location: Schweiz

PostPosted: Sat May 04, 2024 7:17 am    Post subject: Reply with quote

Ist eine ganze Weile her das ich sssd ausprobiert habe, aber nur mal so geraten hast du in der sssd.conf den PAM-Service aktiviert?
Code:
[sssd]
config_file_version = 2
services = nss, pam
...


EDIT:
Mit der folgenden Software kann man PAM-Konfigurationen richtig gut testen:
https://pamtester.sourceforge.net
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2237
Location: My own world! I and Gentoo!

PostPosted: Sun May 05, 2024 3:09 pm    Post subject: Reply with quote

schmidicom wrote:
Ist eine ganze Weile her das ich sssd ausprobiert habe,


Ja, genau das Problem habe ich auch... das letzte mal hab ichs irgendwann 2.HJ ~2017 eingerichtet oder so... und jetzt nach etwa 1 Jahr im neuen Job mal wieder...

schmidicom wrote:
aber nur mal so geraten hast du in der sssd.conf den PAM-Service aktiviert?
Code:
[sssd]
config_file_version = 2
services = nss, pam
...


Der pam-service von sssd ist aktiv, ja.

schmidicom wrote:
EDIT:
Mit der folgenden Software kann man PAM-Konfigurationen richtig gut testen:
https://pamtester.sourceforge.net


Uuuuh das ist cool, der sagt mir ebenfalls dass der auth fehl schlägt, während pam_sss success meldet. Aber immerhin testet es sich so leichter.

Ich probiers mal weiter... vielleicht ist das Thema auch woanders verwurzelt.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum