Bug 25244 - Authentisierung von Vertrauensstellung-Benutzern an UCS-Memberservern defekt
Authentisierung von Vertrauensstellung-Benutzern an UCS-Memberservern defekt
Status: CLOSED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Stefan Gohmann
Arvid Requate
: interim-1
Depends on:
Blocks: 28433
  Show dependency treegraph
 
Reported: 2011-12-06 19:18 CET by Arvid Requate
Modified: 2012-12-12 21:11 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Skript, dass alle winbind-Lookups für einen Benutzer testet: check-winbind-user ARDOM2+winuser1%Univention123 (2.29 KB, text/plain)
2011-12-07 12:31 CET, Arvid Requate
Details
Testprotokoll UCS 3.0-1 (13.34 KB, text/plain)
2012-07-06 00:29 CEST, Arvid Requate
Details
Testprotokoll UCS 2.4-1 (18.39 KB, text/plain)
2012-07-06 00:31 CEST, Arvid Requate
Details
auth-master-v2.pcap (43.77 KB, application/cap)
2012-09-06 15:19 CEST, Stefan Gohmann
Details
auth-member-v2.pcap (18.34 KB, application/cap)
2012-09-06 15:19 CEST, Stefan Gohmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2011-12-06 19:18:47 CET
Auf UCS 3.0 Memberservern können Benutzer einer Windows-Domäne, mit der eine Vertrauensstellung eingerichtet ist, nicht korrekt authentisert werden. Auf Master, Backup und Slave geht das hingegen. Das Fehlerbild:


root@member123:~# wbinfo -a ARDOM2+winuser1%Univention123
plaintext password authentication failed
Could not authenticate user ARDOM2+winuser1%Univention123 with plaintext password
challenge/response password authentication failed
error code was NT_STATUS_NO_SUCH_USER (0xc0000064)
error messsage was: No such user
Could not authenticate user ARDOM2+winuser1 with challenge/response


Jetzt wird's bizarr: Wenn man unter UCS einen gleichnamigen Benutzer (mit anderem Passwort) anlegt, dann geht es:

root@member123:~# wbinfo -a ARDOM2+user5%Univention123
plaintext password authentication succeeded
challenge/response password authentication succeeded
## Der UCS-Benutzer hatte wirklich ein anderes Passwort:
root@member123:~# wbinfo -a user5%univention
plaintext password authentication failed
Could not authenticate user user5%univention with plaintext password
challenge/response password authentication succeeded

Wenn man das Konto des gleichnamigen UCS-Benutzers per UDM deaktivert, schlägt das auf den ARDOM2+user5 aus der Vertrauten Windows-Domäne durch:

root@member123:~# wbinfo -a ARDOM2+user5%Univention123
plaintext password authentication failed
Could not authenticate user ARDOM2+user5%Univention123 with plaintext password
challenge/response password authentication failed
error code was NT_STATUS_ACCOUNT_EXPIRED (0xc0000193)
error messsage was: Account expired
Could not authenticate user ARDOM2+user5 with challenge/response
Comment 1 Arvid Requate univentionstaff 2011-12-06 20:00:39 CET
Das gleiche Fehlerbild zeigt sich an Windows-Clients, die Mitglied der UCS-Domäne sind (getestet mit Windows XP und Windows 7).
Comment 2 Arvid Requate univentionstaff 2011-12-07 12:31:19 CET
Created attachment 3986 [details]
Skript, dass alle winbind-Lookups für einen Benutzer testet: check-winbind-user ARDOM2+winuser1%Univention123

Irgendwann später, nach diversen Tests mit "nscd stop; winbind stop; samba stop; firewall stop; firewall start samba start; sleep 10; net cache flush; winbind start" und Tests mit dem angehängten Skript ging dann endlich das essenziell wichtige

 getent passwd ARDOM2+winuser1

Bei einem neu angelegten Benutzer ist der Fehler jetzt genau so wieder da. Output des Skripts:
----------------------
root@member123:~# ./check-winbind-user ARDOM2+winuser5%Test1234.
sid:            S-1-5-21-215963510-1792852931-2165353431-1127
username:       ARDOM2+winuser5
uid:            55006
Could not get groups for user ARDOM2+winuser5
ERROR: lookup of GIDs for user failed
Could not get group SIDs for user SID S-1-5-21-215963510-1792852931-2165353431-1127
ERROR: getent passwd: no entry
plaintext password authentication succeeded
challenge/response password authentication succeeded
dcname:         W2K3R2-32
WARNING: enum users failed for domain ARDOM2
WARNING: enum groups failed for domain ARDOM2
----------------------
univention-firewall war dabei sogar aus.


getent passwd liefert hier nichts zurück, obwohl fast alle wbinfo-Auflösungstests funktionierten, Nur nicht:

 root@member123:~# wbinfo --user-groups=ARDOM2+winuser5
 Could not get groups for user ARDOM2+winuser5


Im level 10 log.winbindd steht beim getent passwd:

Could not convert sid S-1-5-21-215963510-1792852931-2165353431-1127: NT_STATUS_INVALID_SID

und beim wbinfo --user-groups:

Could not convert sid S-1-5-21-215963510-1792852931-2165353431-1127: NT_STATUS_SYNCHRONIZATION_REQUIRED


Ich habe den Eindruck, dass der Memberserver erst dann den Benutzer auflösen kann, wenn man zuvor auf einem der DCs (z.B. DC Slave) ein getent passwd ausgeführt hat. Kurze Zeit danach (und nach einem "net cache flush; winbind stop; winbind restart") ist dann auch die Auflösung auf dem Slave möglich.
Comment 3 Arvid Requate univentionstaff 2011-12-07 12:37:34 CET
Das Fehlerbild auf Windows-Clients der UCS-Domäne liess sich hingegen beheben durch die serverseitigen Konfigurationsschritte, die an Bug 24030 Comment 7 dokumentiert sind.
Comment 4 Arvid Requate univentionstaff 2011-12-07 16:11:31 CET
Getestet wurde das alles gegen ein W2k3R2 AD.
Comment 5 Arvid Requate univentionstaff 2012-01-03 15:35:22 CET
Das gleiche Verhalten tritt auch mit Windows 2008 R2 auf. Die Logmeldung weist darauf hin, dass winbind bei der Gruppenauflösung aus unklaren Gründen entscheidet, dass die Windows-Domäne der Samba-Domäne nicht vertraut. Ein Wireshark-trace zeigt entsprechend, wie auch die log-Dateien, keinen Kommunikationsversuch zwischen dem Memberserver und der Windows-Domäne. Auf Slave/Backup/Master sieht man hingegen Anfragen in der log-Datei log.wb-DOM3, wobei DOM3 hier der Windows-Domänenname war.

+[2011/12/07 11:18:06.884472, 10] winbindd/winbindd_util.c:1348(winbindd_can_contact_domain)
+  winbindd_can_contact_domain: DOM3 is an AD domain and we have no inbound trust.
+[2011/12/07 11:18:06.884500, 10] winbindd/winbindd_rpc.c:578(lookup_usergroups)
+  lookup_usergroups: No incoming trust for domain DOM3
+[2011/12/07 11:18:06.884530,  1] ../librpc/ndr/ndr.c:251(ndr_print_function_debug)
+       wbint_LookupUserGroups: struct wbint_LookupUserGroups
+          out: struct wbint_LookupUserGroups
+              sids                     : *
+                  sids: struct wbint_SidArray
+                      num_sids                 : 0x00000000 (0)
+                      sids: ARRAY(0)
+              result                   : NT_STATUS_SYNCHRONIZATION_REQUIRED
Comment 6 Arvid Requate univentionstaff 2012-01-03 15:39:06 CET
Zum Vergleich sollte das Verhalten eines UCS 2.4-1 (Samba 3.5.4) getestet werden, denn an Ticket#: 2011011710013431 sollte das ja funktioniert haben.
Comment 7 Arvid Requate univentionstaff 2012-07-06 00:29:53 CEST
Created attachment 4510 [details]
Testprotokoll UCS 3.0-1

Das Zusammenspiel zwischen Memberserver, UCS DC und AD DC ist hier anscheinend der kritische Punkt. Wenn man auf dem UCS Master per "net setauthuser" Benutzer-Credentials hinterlegt, mit dem sich AD-Benutzer auflisten lassen (wbinfo -u), dann funktioniert die Authentifikation der Benutzer sowohl auf dem UCS DC als auch auf dem Memberserver. Irgendwie ist der Memberserver darauf angewiesen, dass der UCS DC die Accounts kennt.

Wenn man andererseits die Firewall für UDP Antworten auf Port 137 freischaltet, funktionierte es bei mir dann auch ohne das "setauthuser"...

Was sowohl in UCS 2.4-1 als auch in UCS 3.0-1 seltsam ist, das ist, dass überhaupt per "net setauthuser" explizit Credentials aus der AD-Domäne angegeben werden müssen um benutzer und gruppen "enumeration" hinzubekommen, statt dass das einfach über die Vertrauensmechanismen funktioniert. Vielleicht ist das ein Hinweis auf ein strukturelles Problem?

Ich würde sonst erstmal nur erneut auf die Empfehlungen von Bug 24030 Comment 6 verweisen. Firewall ist hier anscheinend entscheident, setauthuser hilft auch und "winbind rpc only = yes" ist essenziell.
Comment 8 Arvid Requate univentionstaff 2012-07-06 00:31:18 CEST
Created attachment 4511 [details]
Testprotokoll UCS 2.4-1

Unter UCS 2.4-1 blockierte die Firewall noch nicht UDP Port 137, sonst ist das Verhalten recht ähnlich.
Comment 9 Arvid Requate univentionstaff 2012-07-09 11:35:27 CEST
Nochmal zur Info für die QA:

Es geht hier um eine Vertrauensstellung "UCS vertraut Windows". Zur Einrichtung muss auf einem AD-DC in einer separaten Windows-Domäne entweder eine unidirektionale Vertrauensstellung vom Typ "eingehend" angelegt werden, oder eine bidirektionale. Das Vorgehen sollte im Handbuch beschrieben sein:

echo "iptables -I INPUT 1 -p udp --sport 137 -j ACCEPT" \         
    >> /etc/security/packetfilter.d/50_local.sh
/etc/init.d/univention-firewall restart

univention-install winbind
echo -e "[global]\n\twinbind rpc only = yes" >> /etc/samba/local.conf
net rpc trustdom establish ADDOMAIN
/etc/init.d/winbind restart

wbinfo -p         # winbind ansprechbar?
wbinfo --ping-dc  # DC ansprechbar ?
net rpc trustdom list -UAdministrator
wbinfo -a ADDOMAIN+Administrator
Comment 10 Stefan Gohmann univentionstaff 2012-07-17 07:59:29 CEST
Nach den angegebenen Schritten kann ich mich auf dem Memberserver als AD Benutzer noch nicht anmelden, auf dem Master hingegen schon.

root@master131:~# ssh 'DEADLOCK13AD+ad1'@member132
Password: 
Wrong Password

Password: 
Wrong Password

Password: 

root@master131:~# ssh 'DEADLOCK13AD+ad1'@master131
Password: 
Last login: Tue Jul 17 01:44:42 2012 from master131.deadlock13.local
DEADLOCK13AD+ad1@master131:~$ 


(In reply to comment #7)
> Created an attachment (id=4510) [details]
> Testprotokoll UCS 3.0-1
> 
> Das Zusammenspiel zwischen Memberserver, UCS DC und AD DC ist hier anscheinend
> der kritische Punkt. Wenn man auf dem UCS Master per "net setauthuser"
> Benutzer-Credentials hinterlegt, mit dem sich AD-Benutzer auflisten lassen
> (wbinfo -u), dann funktioniert die Authentifikation der Benutzer sowohl auf dem
> UCS DC als auch auf dem Memberserver. Irgendwie ist der Memberserver darauf
> angewiesen, dass der UCS DC die Accounts kennt.
> 
> Wenn man andererseits die Firewall für UDP Antworten auf Port 137 freischaltet,
> funktionierte es bei mir dann auch ohne das "setauthuser"...

Der Port 137 muss auch auf dem Memberserver freigeschaltet werden?

> Was sowohl in UCS 2.4-1 als auch in UCS 3.0-1 seltsam ist, das ist, dass
> überhaupt per "net setauthuser" explizit Credentials aus der AD-Domäne
> angegeben werden müssen um benutzer und gruppen "enumeration" hinzubekommen,
> statt dass das einfach über die Vertrauensmechanismen funktioniert. Vielleicht
> ist das ein Hinweis auf ein strukturelles Problem?

Das net setauthuser müsste auf allen DCs gemacht werden und nicht auf dem Memberserver gemacht werden, oder?
Comment 11 Stefan Gohmann univentionstaff 2012-07-17 08:23:48 CEST
Vorgehen auf dem DC Master:

root@master131:~# echo "iptables -I INPUT 1 -p udp --sport 137 -j ACCEPT" \
>     >> /etc/security/packetfilter.d/50_local.sh
root@master131:~# /etc/init.d/univention-firewall restart
Stopping Univention iptables configuration::.
Starting Univention iptables configuration::.
root@master131:~# echo -e "[global]\nwinbind rpc only = yes" >> /etc/samba/local.conf
root@master131:~# univention-install winbind
root@master131:~# univention-install winbind
[...]
Unpacking winbind (from .../winbind_2%3a3.5.11~dfsg-10.532.201207162212_amd64.deb) ...
Processing triggers for man-db ...
Setting up winbind (2:3.5.11~dfsg-10.532.201207162212) ...
Starting the Winbind daemon: winbind.
root@master131:~# net setauthuser -U Administrator
Enter the auth user's password:
root@master131:~# net rpc trustdom establish DEADLOCK13AD
Enter DEADLOCK13$'s password:
Could not connect to server W2K8R2-64
Trust to domain DEADLOCK13AD established
root@master131:~# /etc/init.d/winbind restart
Stopping the Winbind daemon: winbind.
wbinStarting the Winbind daemon: winbind.
root@master131:~# wbinfo -u
administrator
join-backup
join-slave
DEADLOCK13AD+administrator
DEADLOCK13AD+gast
DEADLOCK13AD+krbtgt
root@master131:~# eval "$(univention-config-registry shell)"
root@master131:~# univention-config-registry set auth/methods="$auth_methods winbind"
Setting auth/methods
File: /etc/pam.d/common-auth-nowrite
Multifile: /etc/pam.d/common-auth
File: /etc/pam.d/common-password
File: /etc/ssh/ssh_config
File: /etc/pam.d/common-account
File: /etc/nsswitch.conf
Multifile: /etc/pam.d/common-session
File: /etc/pam.d/univention-management-console
root@master131:~# /etc/init.d/nscd restart
Restarting NSCD:.
root@master131:~# ucr set auth/sshd/restrict="no" 
Setting auth/sshd/restrict
File: /etc/pam.d/sshd
root@master131:~# ssh 'DEADLOCK13AD+ad1'@master131
The authenticity of host 'master131 (10.201.13.1)' can't be established.
RSA key fingerprint is d3:8f:df:45:54:b0:33:18:7b:ff:c1:95:ed:96:59:17.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'master131,10.201.13.1' (RSA) to the list of known hosts.
Password: 
DEADLOCK13AD+ad1@master131:~$ 


Vorgehen auf dem Memberserver:
root@member132:~# wbinfo -p 
Ping to winbindd succeeded
root@member132:~# wbinfo --ping-dc
checking the NETLOGON dc connection succeeded
root@member132:~# net rpc trustdom list -UAdministrator
Enter Administrator's password:
Trusted domains list:

DEADLOCK13AD        S-1-5-21-1950644492-691169364-2646992570

Trusting domains list:

none
root@member132:~# wbinfo -a DEADLOCK13AD+Administrator
Enter DEADLOCK13AD+Administrator's password: 
plaintext password authentication succeeded
Enter DEADLOCK13AD+Administrator's password: 
challenge/response password authentication succeeded
root@member132:~# wbinfo -a DEADLOCK13AD+ad1
Enter DEADLOCK13AD+ad1's password: 
plaintext password authentication succeeded
Enter DEADLOCK13AD+ad1's password: 
challenge/response password authentication succeeded
root@member132:~# ucr set auth/sshd/restrict="no"
Create auth/sshd/restrict
File: /etc/pam.d/sshd
root@member132:~# ucr set auth/methods="krb5 winbind ldap unix" 
Setting auth/methods
File: /etc/pam.d/common-auth-nowrite
Multifile: /etc/pam.d/common-auth
File: /etc/pam.d/common-password
File: /etc/ssh/ssh_config
File: /etc/pam.d/common-account
File: /etc/nsswitch.conf
Multifile: /etc/pam.d/common-session
File: /etc/pam.d/univention-management-console
root@member132:~# ssh 'DEADLOCK13AD+ad1'@member132
Password: 
Wrong Password

Password: 

Firewall Umstellung, "winbind rpc only" und setauthuser haben keine Verbesserung gebracht.
Comment 12 Stefan Gohmann univentionstaff 2012-07-17 11:55:29 CEST
Grundsätzlich funktioniert es so besser, aber der Login auf dem Memberserver per ssh funktioniert bei mir nicht zuverlässig. Das sollte mit UCS 3.1 und Samba 3.6 nochmal geprüft werden.
Comment 13 Stefan Gohmann univentionstaff 2012-09-06 11:22:54 CEST
Problem besteht mit Samba 3.6 weiterhin.

Befehl:
root@member82:~# wbinfo -a AD8+aduser%Univention.99
plaintext password authentication succeeded
challenge/response password authentication succeeded
root@member82:~# 

Logdatei (Member):
-----------------------------------------------------------------------
==> /var/log/samba/log.winbindd <==
[2012/09/06 05:18:17.115164,  3] winbindd/winbindd_misc.c:384(winbindd_interface_version)
  [ 4902]: request interface version
[2012/09/06 05:18:17.115608,  3] winbindd/winbindd_misc.c:417(winbindd_priv_pipe_dir)
  [ 4902]: request location of privileged pipe
[2012/09/06 05:18:17.116044,  3] winbindd/winbindd_pam_auth.c:54(winbindd_pam_auth_send)
  [ 4902]: pam auth AD8+aduser

==> /var/log/samba/log.wb-DEADLOCK8 <==
[2012/09/06 05:18:17.116265,  4] winbindd/winbindd_dual.c:1549(fork_domain_child)
  child daemon request 13
[2012/09/06 05:18:17.116396,  3] winbindd/winbindd_pam.c:1529(winbindd_dual_pam_auth)
  [ 4463]: dual pam auth AD8+aduser
[2012/09/06 05:18:17.116561,  5] ../libcli/auth/credentials.c:108(netlogon_creds_step)
        seed        3f96b27a:c8da7171
[2012/09/06 05:18:17.116671,  5] ../libcli/auth/credentials.c:113(netlogon_creds_step)
        seed+time   8fdf1c2c:c8da7171
[2012/09/06 05:18:17.116819,  5] ../libcli/auth/credentials.c:118(netlogon_creds_step)
        CLIENT      a41a26b0:88398283
[2012/09/06 05:18:17.116927,  5] ../libcli/auth/credentials.c:124(netlogon_creds_step)
        seed+time+1 8fdf1c2d:c8da7171
[2012/09/06 05:18:17.117069,  5] ../libcli/auth/credentials.c:129(netlogon_creds_step)
        SERVER      7f72e3a0:8ed8ea23
[2012/09/06 05:18:17.117280,  5] rpc_client/cli_pipe.c:738(rpc_api_pipe_send)
  rpc_api_pipe: host MASTER81
[2012/09/06 05:18:17.126985,  5] rpc_client/cli_pipe.c:97(rpc_read_send)
  rpc_read_send: data_to_read: 472
[2012/09/06 05:18:17.127624,  5] winbindd/winbindd_pam.c:1770(winbindd_dual_pam_auth)
  Plain-text authentication for user AD8+aduser returned NT_STATUS_OK (PAM: 0)
[2012/09/06 05:18:17.128042,  4] winbindd/winbindd_dual.c:1557(fork_domain_child)
  Finished processing child request 13

==> /var/log/samba/log.winbindd <==
[2012/09/06 05:18:17.129022,  3] winbindd/winbindd_misc.c:384(winbindd_interface_version)
  [ 4902]: request interface version
[2012/09/06 05:18:17.129379,  3] winbindd/winbindd_misc.c:372(winbindd_info)
  [ 4902]: request misc info
[2012/09/06 05:18:17.129692,  3] winbindd/winbindd_misc.c:405(winbindd_netbios_name)
  [ 4902]: request netbios name
[2012/09/06 05:18:17.130000,  3] winbindd/winbindd_misc.c:394(winbindd_domain_name)
  [ 4902]: request domain name
[2012/09/06 05:18:17.130238,  3] winbindd/winbindd_misc.c:226(winbindd_domain_info)
  [ 4902]: domain_info [DEADLOCK8]
[2012/09/06 05:18:17.131220,  3] winbindd/winbindd_pam_auth_crap.c:56(winbindd_pam_auth_crap_send)
  [ 4902]: pam auth crap domain: [AD8] user: aduser

==> /var/log/samba/log.wb-DEADLOCK8 <==
[2012/09/06 05:18:17.131442,  4] winbindd/winbindd_dual.c:1549(fork_domain_child)
  child daemon request 14
[2012/09/06 05:18:17.131955,  3] winbindd/winbindd_pam.c:1798(winbindd_dual_pam_auth_crap)
  [ 4463]: pam auth crap domain: AD8 user: aduser
[2012/09/06 05:18:17.132229,  5] ../libcli/auth/credentials.c:108(netlogon_creds_step)
        seed        8fdf1c2d:c8da7171
[2012/09/06 05:18:17.132490,  5] ../libcli/auth/credentials.c:113(netlogon_creds_step)
        seed+time   e02785e1:c8da7171
[2012/09/06 05:18:17.132790,  5] ../libcli/auth/credentials.c:118(netlogon_creds_step)
        CLIENT      71010fd1:c1c14694
[2012/09/06 05:18:17.133066,  5] ../libcli/auth/credentials.c:124(netlogon_creds_step)
        seed+time+1 e02785e2:c8da7171
[2012/09/06 05:18:17.133385,  5] ../libcli/auth/credentials.c:129(netlogon_creds_step)
        SERVER      6627366d:debf1394
[2012/09/06 05:18:17.133703,  5] rpc_client/cli_pipe.c:738(rpc_api_pipe_send)
  rpc_api_pipe: host MASTER81
[2012/09/06 05:18:17.140602,  5] rpc_client/cli_pipe.c:97(rpc_read_send)
  rpc_read_send: data_to_read: 472
[2012/09/06 05:18:17.141178,  5] winbindd/winbindd_pam.c:1903(winbindd_dual_pam_auth_crap)
  NTLM CRAP authentication for user [AD8]\[aduser] returned NT_STATUS_OK (PAM: 0)
[2012/09/06 05:18:17.141594,  4] winbindd/winbindd_dual.c:1557(fork_domain_child)
  Finished processing child request 14
-----------------------------------------------------------------------

Logdatei (Master):
-----------------------------------------------------------------------
[2012/09/06 05:21:28.481054,  2] auth/auth.c:309(check_ntlm_password)
  check_ntlm_password:  authentication for user [aduser] -> [aduser] -> [AD8+aduser] succeeded
[2012/09/06 05:21:28.487989,  2] passdb/pdb_ldap.c:553(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: member82$
[2012/09/06 05:21:28.490241,  2] passdb/pdb_ldap.c:2424(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 5007
[2012/09/06 05:21:28.497145,  2] auth/auth.c:309(check_ntlm_password)
  check_ntlm_password:  authentication for user [MEMBER82$] -> [MEMBER82$] -> [member82$] succeeded
[2012/09/06 05:21:28.512376,  2] auth/auth.c:309(check_ntlm_password)
  check_ntlm_password:  authentication for user [aduser] -> [aduser] -> [AD8+aduser] succeeded

-----------------------------------------------------------------------

Befehl:
root@member82:~# ssh 'AD8+aduser'@member82
Password: 
Wrong Password



Logdatei (Member):
-----------------------------------------------------------------------
==> /var/log/samba/log.winbindd <==
[2012/09/06 05:19:21.725410,  3] winbindd/winbindd_misc.c:384(winbindd_interface_version)
  [ 4930]: request interface version
[2012/09/06 05:19:21.725847,  3] winbindd/winbindd_misc.c:417(winbindd_priv_pipe_dir)
  [ 4930]: request location of privileged pipe
[2012/09/06 05:19:21.726291,  3] winbindd/winbindd_pam_auth.c:54(winbindd_pam_auth_send)
  [ 4930]: pam auth AD8+aduser

==> /var/log/samba/log.wb-DEADLOCK8 <==
[2012/09/06 05:19:21.726511,  4] winbindd/winbindd_dual.c:1549(fork_domain_child)
  child daemon request 13
[2012/09/06 05:19:21.726646,  3] winbindd/winbindd_pam.c:1529(winbindd_dual_pam_auth)
  [ 4463]: dual pam auth AD8+aduser
[2012/09/06 05:19:21.726810,  5] ../libcli/auth/credentials.c:108(netlogon_creds_step)
        seed        e02785e2:c8da7171
[2012/09/06 05:19:21.726920,  5] ../libcli/auth/credentials.c:113(netlogon_creds_step)
        seed+time   306fef98:c8da7171
[2012/09/06 05:19:21.727063,  5] ../libcli/auth/credentials.c:118(netlogon_creds_step)
        CLIENT      e01ff90a:89e8d639
[2012/09/06 05:19:21.727171,  5] ../libcli/auth/credentials.c:124(netlogon_creds_step)
        seed+time+1 306fef99:c8da7171
[2012/09/06 05:19:21.727313,  5] ../libcli/auth/credentials.c:129(netlogon_creds_step)
        SERVER      a2a69c48:d0566a20
[2012/09/06 05:19:21.727501,  5] rpc_client/cli_pipe.c:738(rpc_api_pipe_send)
  rpc_api_pipe: host MASTER81
[2012/09/06 05:19:21.732892,  5] rpc_client/cli_pipe.c:97(rpc_read_send)
  rpc_read_send: data_to_read: 288
[2012/09/06 05:19:21.733631,  2] winbindd/winbindd_pam.c:1770(winbindd_dual_pam_auth)
  Plain-text authentication for user AD8+aduser returned NT_STATUS_WRONG_PASSWORD (PAM: 7)
[2012/09/06 05:19:21.734045,  4] winbindd/winbindd_dual.c:1557(fork_domain_child)
  Finished processing child request 13
-----------------------------------------------------------------------

Logdatei (Master):
-----------------------------------------------------------------------
==> /var/log/samba/log.wb-AD8 <==
[2012/09/06 05:21:11.585696,  2] winbindd/winbindd_pam.c:1903(winbindd_dual_pam_auth_crap)
  NTLM CRAP authentication for user [AD8]\[aduser] returned NT_STATUS_WRONG_PASSWORD (PAM: 7)

==> /var/log/samba/log.smbd <==
[2012/09/06 05:21:11.586302,  2] auth/auth.c:319(check_ntlm_password)
  check_ntlm_password:  Authentication for user [aduser] -> [aduser] FAILED with error NT_STATUS_WRONG_PASSWORD
-----------------------------------------------------------------------
Comment 14 Stefan Gohmann univentionstaff 2012-09-06 15:19:16 CEST
Created attachment 4640 [details]
auth-master-v2.pcap

tcpdump von der erfolgreichen ssh-Anmeldung mit einem AD Benutzer am Master.
Comment 15 Stefan Gohmann univentionstaff 2012-09-06 15:19:51 CEST
Created attachment 4641 [details]
auth-member-v2.pcap

tcpdump von der erfolglosen ssh-Anmeldung mit einem AD Benutzer am Member.
Comment 16 Stefan Gohmann univentionstaff 2012-09-07 07:14:11 CEST
Auf dem Windows Server müssen Einstellungen vorgenommen werden, damit der Memberserver eine Connection zu dem AD Server aufbauen darf:

http://support.microsoft.com/kb/942564/en-us

Symptom 5
A Windows NT 4.0 primary domain controller (PDC) cannot create an external trust between itself and a PDC emulator that is running Windows Server 2008 R2. Servers that are running Windows Server 2008 R2 cannot be accessed by using a Windows NT 4.0-based domain trust. Windows NT 4.0 members that are in a Windows NT 4.0-based domain also cannot access domain controllers that are running Windows Server 2008 R2 by using a trust. This behavior occurs even if the trust was created between a PDC that is running Windows NT 4.0 and a PDC that is running Windows Server 2008 or Windows Server 2003. 

Workaround:
Log on to a Windows Server 2008-based domain controller.
Click Start, click Run, type gpmc.msc, and then click OK.
In the Group Policy Management console, expand Forest: DomainName, expand DomainName, expand Domain Controllers, right-click Default Domain Controllers Policy, and then click Edit.
In the Group Policy Management Editor console, expand Computer Configuration, expand Policies, expand Administrative Templates, expand System, click Net Logon, and then double-click Allow cryptography algorithms compatible with Windows NT 4.0.
In the Properties dialog box, click the Enabled option, and then click OK.

Allerdings scheinen diese Punkte noch nicht zu reichen. Weitere Einstellungen, die gemacht wurden:
 http://support.microsoft.com/kb/889030/en-us

Aber auch das reicht zumindest für den Windows 2008 Server noch nicht aus.

Mit aktiviertem Netlogon Debug (http://support.microsoft.com/kb/109626/en-us) ist folgendes zu sehen:

Anmeldung per smbclient mit einem AD User am Memberserver:
09/07 07:10:15 [MISC] AD8: DsGetDcName function called: Dom:ad8.local Acct:(null) Flags: DS BACKGROUND RET_DNS                                                                                                          
09/07 07:10:15 [MISC] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c01ffff1
09/07 07:10:15 [MAILSLOT] Received ping from W2K8R2-64 ad8.local (null) on <Local>
09/07 07:10:15 [MAILSLOT] AD8: Ping response 'Sam Logon Response Ex' (null) to \\W2K8R2-64 Site: Default-First-Site-Name on <Local>
09/07 07:10:15 [MISC] AD8: DsGetDcName function returns 0: Dom:ad8.local Acct:(null) Flags: DS BACKGROUND RET_DNS 
09/07 07:10:15 [MISC] AD8: DsGetDcName function called: Dom:w2k8r2-64.ad8.local Acct:(null) Flags: LDAPONLY RET_DNS 
09/07 07:10:15 [MISC] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c01ffff1
09/07 07:10:15 [MAILSLOT] Received ping from W2K8R2-64 w2k8r2-64.ad8.local (null) on <Local>
09/07 07:10:15 [CRITICAL] Ping from W2K8R2-64 for domain w2k8r2-64.ad8.local (null) for (null) on <Local> is invalid since we don't host the named domain.
09/07 07:10:15 [CRITICAL] NetpDcGetNameIp: w2k8r2-64.ad8.local: No data returned from DnsQuery.
09/07 07:10:15 [MISC] NetpDcGetName: NetpDcGetNameIp returned 1355
09/07 07:10:15 [CRITICAL] NetpDcGetName: w2k8r2-64.ad8.local: IP and Netbios are both done.
09/07 07:10:15 [MISC] AD8: DsGetDcName function returns 1355: Dom:w2k8r2-64.ad8.local Acct:(null) Flags: LDAPONLY RET_DNS 
09/07 07:10:15 [SITE] DsrGetSiteName: Returning site name 'Default-First-Site-Name' from local cache.
09/07 07:10:15 [MISC] AD8: DsGetDcName function called: Dom:ad8.local Acct:(null) Flags: LDAPONLY RET_DNS 
09/07 07:10:15 [MISC] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c01ffff1
09/07 07:10:15 [MAILSLOT] Received ping from W2K8R2-64 ad8.local (null) on <Local>
09/07 07:10:15 [MAILSLOT] AD8: Ping response 'Sam Logon Response Ex' (null) to \\W2K8R2-64 Site: Default-First-Site-Name on <Local>
09/07 07:10:15 [MISC] AD8: DsGetDcName function returns 0: Dom:ad8.local Acct:(null) Flags: LDAPONLY RET_DNS 
09/07 07:10:18 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Entered
09/07 07:10:18 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Returns 0x0



Anmeldung per smbclient mit einem AD User am Master:
09/07 07:10:38 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Entered                                                                                                                
09/07 07:10:38 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Returns 0x0
Comment 17 Stefan Gohmann univentionstaff 2012-09-07 07:32:30 CEST
DNS Einträge wurden im AD für die UCS Systeme hinterlegt und der Netlogon Debug von 2080FFFF auf FFFFFFFF gestellt:

Master:
09/07 07:27:25 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Session Key: f8c03da5 34e9d1b0 3865dede 20c401db   .=.....4..e8...
09/07 07:27:25 [ENCRYPT] NlpVerifyOrUnseal: 0.b: IV: c2ae19a3 bc593787 43664ce6 08b18294   .....7Y..LfC....
09/07 07:27:25 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Encrypted Seq: 4a796898 bae1b53f dac41bee d969ee13   .hyJ?.........i.
09/07 07:27:25 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Clear Seq: dcaf3cc3 3c77309c 252aaf77 fcadc3b1   .<...0w<w.*%....
09/07 07:27:25 [ENCRYPT] NlpVerifyOrUnseal: 0.b: First Several of signature: ee7a0f59 c086cb83 22dd2a30 a54b65fd   Y.z.....0*.".eK.
09/07 07:27:25 [SESSION] UnsealMessage: 0.b: returns 0x0
09/07 07:27:25 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Entered
09/07 07:27:25 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Returns 0x0
09/07 07:27:25 [ENCRYPT] NlpSignOrSeal: 0.b: Session Key: f8c03da5 34e9d1b0 3865dede 20c401db   .=.....4..e8...
09/07 07:27:25 [ENCRYPT] NlpSignOrSeal: 0.b: IV: 65d4cf7a 1af7e067 680e5d07 664cbee8   z..eg....].h..Lf
09/07 07:27:25 [ENCRYPT] NlpSignOrSeal: 0.b: Clear Seq: 67dd8ad5 eebbcb22 69e77afb 84568526   ...g"....z.i&.V.
09/07 07:27:25 [ENCRYPT] NlpSignOrSeal: 0.b: Encrypted Seq: a00bdcc6 f6524f7c 32fccfd9 add6d63a   ....|OR....2:...
09/07 07:27:25 [SESSION] SealMessage: 0.b: returns 0x0


Member:
09/07 07:26:52 [SITE] ISMRetryTimer is up
09/07 07:26:52 [SITE] Adding subnet to site mappings from the DS
09/07 07:26:52 [SITE] NlSitesGetIsmConnect: Site link costs for 1 sites: 
09/07 07:26:52 [SITE]         0
09/07 07:26:52 [SITE] *( 0) Default-First-Site-Name
09/07 07:26:52 [SITE]         0
09/07 07:26:52 [SITE] NlSitesGetNextClosestSites Default-First-Site-Name: Site ignoring itself.
09/07 07:26:52 [SITE] NlSitesGetNextClosestSites Default-First-Site-Name: Site does not have next closest site.
09/07 07:26:52 [SITE] NlSitesEndSubnetEnum: Entered
09/07 07:26:52 [SITE] NlSitesEndSubnetEnum: Exitted
09/07 07:26:52 [SITE] There is only one site.  All clients belong to it.
09/07 07:26:52 [SITE] Detect that ISM services is started.
09/07 07:26:52 [MAILSLOT] Going to wait on mailslot. (Timeout: 242033)
09/07 07:27:07 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Session Key: f8c03da5 34e9d1b0 3865dede 20c401db   .=.....4..e8... 
09/07 07:27:07 [ENCRYPT] NlpVerifyOrUnseal: 0.b: IV: ba000776 3502b9f7 22a1d95e 6a3f6227   v......5^.."'b?j
09/07 07:27:07 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Encrypted Seq: 54d97387 77f4a2b3 d5aac05b 3362503b   .s.T...w[...;Pb3
09/07 07:27:07 [ENCRYPT] NlpVerifyOrUnseal: 0.b: Clear Seq: 227b737d 67f7da17 b246331e 703253cf   }s{"...g.3F..S2p
09/07 07:27:07 [ENCRYPT] NlpVerifyOrUnseal: 0.b: First Several of signature: ee7a0f59 c086cb83 22dd2a30 a54b65fd   Y.z.....0*.".eK.
09/07 07:27:07 [SESSION] UnsealMessage: 0.b: returns 0x0
09/07 07:27:07 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Entered
09/07 07:27:07 [LOGON] AD8: SamLogon: Network logon of AD8\aduser from \\MASTER81 (via MASTER81) Returns 0x0
09/07 07:27:07 [ENCRYPT] NlpSignOrSeal: 0.b: Session Key: f8c03da5 34e9d1b0 3865dede 20c401db   .=.....4..e8... 
09/07 07:27:07 [ENCRYPT] NlpSignOrSeal: 0.b: IV: c10e0652 2ba17677 719237e8 aa23beaa   R...wv.+.7.q..#.
09/07 07:27:07 [ENCRYPT] NlpSignOrSeal: 0.b: Clear Seq: ec970d62 3933976a 291c25b0 4471e8b0   b...j.39.%.)..qD
09/07 07:27:07 [ENCRYPT] NlpSignOrSeal: 0.b: Encrypted Seq: a402b32b b868fdbc c0a31cd5 6025ae45   +.....h.....E.%`
09/07 07:27:07 [SESSION] SealMessage: 0.b: returns 0x0
Comment 18 Stefan Gohmann univentionstaff 2012-09-07 18:06:02 CEST
Anstatt einem Memberserver sollte in so einem Szenario ein DC Slave verwendet werden. Das sollte entsprechend dokumentiert werden: Bug #28433.
Comment 19 Stefan Gohmann univentionstaff 2012-12-12 21:11:02 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".