Bug 28373 - 3.0-2: Nach samba4 DC rejoin können lokal keine samba Benutzer angelegt werden
3.0-2: Nach samba4 DC rejoin können lokal keine samba Benutzer angelegt werden
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Arvid Requate
Stefan Gohmann
: interim-1
Depends on: 25393
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-30 10:42 CEST by Arvid Requate
Modified: 2012-12-12 21:10 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
Patch liest rIDNextRID aus und gibt es beim join vor (1.32 KB, patch)
2012-08-30 10:44 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2012-08-30 10:42:13 CEST
Mit dem über Bug 27886 für UCS@school in UCS eingeführte --keep-existing für samba-tool-domain join DC können nach einem erneuten Join eines Samba4 Slave DCs auf dem DC gegen das lokale Samba4 keine Benutzer mehr angelegt werden.

Ursache ist, daß der Slave DC zwar seinen RID-Pool beibehält (ohne --keep-existing wird ihm ein neuer zugewiesen), aber daran die Attribute rIDNextRID und RidPreviousAllocationPools entfernt. Diese Attribute werden laut AD-Dokumentation nicht repliziert, sondern sind nur lokal vorhanden. Da der rIDNextRID Zählerstand fehlt, versucht der DC dann eventuell schon vergebene objectSids zu vergeben.

=================
rIDNextRID:
The RID that was assigned to the last security principal that was created on the local domain controller. RidNextRid is a non-replicated value in Active Directory. 

RidPreviousAllocationPools is a non-replicated value in Active Directory.
=================


+++ This bug was initially created as a clone of Bug #25393 Comment 1 +++

Man kann auf dem frisch neu gejointen Slave einfach keine Benutzer anlegen
(Fehlermeldung scheint auf den erstem Blick nicht korrekt zu usein):
================================================================
root@slave12:~# samba-tool user add foo1 univention
ERROR(ldb): Failed to add user 'foo1':  - ../ldb_tdb/ldb_index.c:1189: Failed
to re-index objectSid in CN=foo1,CN=Users,DC=arucs3i8,DC=qa -
../ldb_tdb/ldb_index.c:1121: unique index violation on objectSid in
CN=foo1,CN=Users,DC=arucs3i8,DC=qa
================================================================
Comment 1 Arvid Requate univentionstaff 2012-08-30 10:44:26 CEST
Created attachment 4630 [details]
Patch liest rIDNextRID aus und gibt es beim join vor

Das dürfte auch UCS@school DCs in der Zentrale betreffen (nicht am Außenstandort).
Comment 2 Arvid Requate univentionstaff 2012-08-30 11:06:08 CEST
Der Patch 92_bug27027_keep_existing_option_for_domain_join_dc.patch ist für UCS 3.1-0 entsprechend angepasst, Paket baut, Test steht noch aus.
Comment 3 Arvid Requate univentionstaff 2012-08-30 19:52:03 CEST
Der Patch war doch deutlich aufwändiger, weil das provision die vorgegebene next_rid leider nicht wirklich setzt. Mit dem angepassten Patch verlieft der Test jetzt OK, UCS 3.1-0 Changelog Eintrag ist jetzt auch da:

"A bug affecting rejoins of Samba 4 DCs has been fixed, where the RID pool rIDNextRID counter was lost, possibly blocking the local creation of new Samba 4 accounts. Now this counter will be preserved during rejoins (\ucsBug{28373})."


Im join.log sieht man damit jetzt:
==============================================================================
cleanup_old_join: rIDAllocationPool: 9015136355904
cleanup_old_join: preserving rIDNextRID: 1601
cleanup_old_join: preserving rIDPreviousAllocationPool: 9015136355904
[...]
Calling bare provision
[...]
do_join: restoring rIDNextRID: 1601
do_join: successfully restored rIDNextRID
Joined domain ARUCS3I8 (SID S-1-5-21-3971689879-1817862189-368804197) as a DC
==============================================================================
Der Patch setzt die alte rIDNextRID nur, wenn nach einem Re-Join der rIDAllocationPool der gleiche geblieben ist (was mit --keep-existing immer der Fall sein sollte).

Mit univention-s4search "cn=rid set" sieht man dann auch dass rIDNextRID vorhaden und auf den Wert vor dem Join gesetzt ist.
Comment 4 Stefan Gohmann univentionstaff 2012-09-11 07:25:36 CEST
Ich kann nach dem neuen Joinen in meiner Domäne über jeden Samba DC Benutzer anlegen und diese werden problemlos repliziert.

Changelog: OK.
Comment 5 Stefan Gohmann univentionstaff 2012-12-12 21:10:17 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".