Bug 27762 - winbind idmap schlägt für mehrere well known sid's fehl
winbind idmap schlägt für mehrere well known sid's fehl
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-28 15:01 CEST by Tim Petersen
Modified: 2018-04-12 15:22 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2012062221009048, 2018041221000737
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2012-06-28 15:01:28 CEST
UCS 3.0 Memberserver mit Samba 3 in einer S4 Umgebung

Aufgefallen an Ticket #2012062221009048:

"
[2012/06/22 15:08:49.833928,  0] lib/smbldap.c:697(smbldap_store_state)

  PANIC: assert failed at lib/smbldap.c(697): tmp_ldap_state == smbldap_state

[2012/06/22 15:09:05.504080,  0] winbindd/idmap_ldap.c:1471(idmap_ldap_set_mapping)

  ldap_set_mapping_internals: Failed to add S-1-5-11 to 61586 mapping [gidNumber]

[2012/06/22 15:09:05.504250,  0] winbindd/idmap_ldap.c:1473(idmap_ldap_set_mapping)

  ldap_set_mapping_internals: Error was: (NULL) (Timed out)
"

Obige Meldung aus der log.winbindd-idmap wiederholt sich laufend.

#####################################################

Gleiche Meldung gibt es auch für:
S-1-1-0 und S-1-5-2

Die Meldungen für alle drei SID's gibt es seit dem 17.04, die GID auf die versucht wird zu mappen wird seitdem ab 59146 iteriert.

root@system:~# wbinfo -s S-1-1-0
+EVERYONE 5
root@system:~# wbinfo -s S-1-5-2
NT AUTHORITY+Network 5
root@system:~# wbinfo -s S-1-5-11
NT AUTHORITY+Authenticated Users 5

root@system:~# wbinfo -n "+EVERYONE"
S-1-1-0 SID_WKN_GROUP (5)
root@system:~# wbinfo -n "+NT AUTHORITY+NETWORK"
S-1-5-2 SID_WKN_GROUP (5)
root@system:~# wbinfo -n "NT AUTHORITY+Authenticated Users"
S-1-5-11 SID_WKN_GROUP (5)

univention-ldapsearch sambaSID=S-1-1-0 gidNumber
# S-1-1-0, idmap, univention, <base>
dn: sambaSID=S-1-1-0,cn=idmap,cn=univention,<base>
gidNumber: 55007
# Everyone, groups, <base<
dn: cn=Everyone,cn=groups,<base>
gidNumber: 20262

univention-ldapsearch sambaSID=S-1-5-2 gidNumber
# S-1-5-2, idmap, univention, <base>
dn: sambaSID=S-1-5-2,cn=idmap,cn=univention,<base>
gidNumber: 55008

univention-ldapsearch sambaSID=S-1-5-11 gidNumber
# S-1-5-11, idmap, univention, <base>
dn: sambaSID=S-1-5-11,cn=idmap,cn=univention,<base>
gidNumber: 55009
# Authenticated Users, groups, <base>
dn: cn=Authenticated Users,cn=groups,<base>
gidNumber: 20260

(LDAP-Basis wegen sensibler Daten durch <base> getauscht)

"wbinfo -Y" liefert für alle drei SID's eine Fehlermeldung:
"Could not convert sid XY to gid"


-> Ich konnte dies so auf einem Testsystem ebenfalls beobachten.
Comment 1 Arvid Requate univentionstaff 2012-07-03 12:07:11 CEST
Zwei Beobachtungen:
1. winbind versucht anscheinend eine LDAP-add eines idmap-Objekts für eine SID, für die schon ein solches Objekt existiert.
2. winbind meldet "Timed Out" in einer LDAP-bezogenen Operation.


A) was liefert 'wbinfo -S S-1-5-11' ?

B) Winbind ist in UCS aktuell so konfiguriert, dass es NSS zur Auflösung von Namen in UIDs verwendet. Da UCS für die meisten Builtin SIDs keine sambaSamAccount Objekte anlegt, könnte es sein, dass Winbind hier davon ausgeht, dass es kein Mapping gibt und daher in die Versuchung kommen, eines zu erstellen.

C) Es könnte theoretisch zusätzlich sein, dass winbind weder Lese- noch Schreibzugriff auf das OpenLDAP-Verzeichnis des Masters hat. Ggf. mal in /etc/samba/smb.conf

  idmap backend =
  idmap alloc config : ldap_url =

prüfen, bzw. die UCR-Variable ldap/server/port (sollte entweder auf 7389 oder nicht gesetzt sein).
Comment 2 Tim Petersen univentionstaff 2012-07-03 12:14:11 CEST
(In reply to comment #1)
 
> A) was liefert 'wbinfo -S S-1-5-11' ?

root@system:~# wbinfo -S S-1-5-11
failed to call wbcSidToUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not convert sid S-1-5-11 to uid

> C) Es könnte theoretisch zusätzlich sein, dass winbind weder Lese- noch
> Schreibzugriff auf das OpenLDAP-Verzeichnis des Masters hat. Ggf. mal in
> /etc/samba/smb.conf
> 
>   idmap backend =
>   idmap alloc config : ldap_url =
> 
> prüfen, 

root@system:~# grep idmap /etc/samba/smb.conf
root@system:~#

> bzw. die UCR-Variable ldap/server/port (sollte entweder auf 7389 oder
> nicht gesetzt sein).

root@system:~# ucr get ldap/server/port 
7389
Comment 3 Tim Petersen univentionstaff 2012-07-03 12:19:52 CEST
(In reply to comment #2)
> (In reply to comment #1)
> 
> > A) was liefert 'wbinfo -S S-1-5-11' ?
> 
> root@system:~# wbinfo -S S-1-5-11
> failed to call wbcSidToUid: WBC_ERR_DOMAIN_NOT_FOUND
> Could not convert sid S-1-5-11 to uid
> 
> > C) Es könnte theoretisch zusätzlich sein, dass winbind weder Lese- noch
> > Schreibzugriff auf das OpenLDAP-Verzeichnis des Masters hat. Ggf. mal in
> > /etc/samba/smb.conf
> > 
> >   idmap backend =
> >   idmap alloc config : ldap_url =
> > 
> > prüfen, 
> 
> root@system:~# grep idmap /etc/samba/smb.conf
> root@system:~#
> 
> > bzw. die UCR-Variable ldap/server/port (sollte entweder auf 7389 oder
> > nicht gesetzt sein).
> 
> root@system:~# ucr get ldap/server/port 
> 7389

Sorry - Ausgaben von falschem System
Comment 4 Arvid Requate univentionstaff 2012-07-03 15:47:04 CEST
Gerade noch aufgfallen: "Authenticated Users" ist in der Tat eine der Builtin accounts, die in UCS explizit auch in OpenLDAP angelegt werden. Daher MUSS der NSS lookup gut gehen, und winbind darf kein IDMAP objekt anlegen.

> univention-ldapsearch sambaSID=S-1-5-11 gidNumber
> # S-1-5-11, idmap, univention, <base>
> dn: sambaSID=S-1-5-11,cn=idmap,cn=univention,<base>
> gidNumber: 55009
> # Authenticated Users, groups, <base>
> dn: cn=Authenticated Users,cn=groups,<base>
> gidNumber: 20260
Comment 5 Stefan Gohmann univentionstaff 2016-10-11 08:02:18 CEST
This issue has been filed against UCS 3.0.

UCS 3.0 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please reopen.