Bug 27886 - Bei "samba-tool domain join DC" behält Samba4 existierende SID nicht bei
Bei "samba-tool domain join DC" behält Samba4 existierende SID nicht bei
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.0
Other Linux
: P5 enhancement (vote)
: UCS 3.0-2
Assigned To: Arvid Requate
Stefan Gohmann
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 11:03 CEST by Arvid Requate
Modified: 2012-07-20 15:25 CEST (History)
2 users (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

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2012-07-12 11:03:08 CEST
Bei "samba-tool domain join DC" behält Samba4 existierende SID nicht bei. Es zeigt sich, dass das dieses Tool ein existierendes DC Objekt bei join selbst löscht.

Im Kontext von UCS@Scchool verursacht das ein Problem, wenn der S4 Connector dann nach dem join versucht die alte SID aus OpenLDAP wieder am DC Objekt im Samba Verzeichnis zu setzen, weil diese noch an dem gelöschten DC Objekt notiert ist.

Vorschlag ist, eine Option --keep-existing in "samba-tool domain join $ucsdomain DC" einzubauen.

+++ This bug was initially created as a clone of Bug #27027 Comment 10 +++

Beim Update des Backups auf Samba 4 wird das Objekt gelöscht und neu angelegt.
Dadurch bekommt der Backup im S4 eine neue SID, allerdings wird diese SID nicht
ins UCS LDAP übertragen. Später wird dann die SID vom UCS ins S4
synchronisiert, allerdings liegt die SID dann noch unter Deleted Objects:

 https://forge.univention.org/bugzilla/show_bug.cgi?id=26647
Comment 1 Arvid Requate univentionstaff 2012-07-12 11:08:14 CEST
Es gibt jetzt eine Option --keep-existing für "samba-tool domain join $ucsdomain DC". Die Option wird für MEMBER ignoriert. Wenn das DC-Objekt nicht existiert, wird normal gejoined, sonst wird der "promote_existing" Code aktiviert. Es wird nur das DC-Objekt selbst nicht gelöscht, die anderen damit verüpften Objekte werden normal vor dem Join entfernt. Dadruch scheint die Replikation normal frisch initialisiert zu werden (durch neue GUIDs für die entsprechenden Objekte). SID und objectGUID des DC-Objekts bleiben erhalten.

Der Patch baut auf die "dcpromo" Erweiterung auf, die ABartlett upstream zur Lösung des Problems vorgeschlagen und implementiert hat (Bug 27027 Comment 11).
Comment 2 Stefan Gohmann univentionstaff 2012-07-13 14:54:16 CEST
Ich bin mir nicht ganz sicher, ob es an dieser Änderung liegt, aber ich bekomme bei der Migration von S3 nach S4 auf einem UCS@school DC Slave folgende Meldung:

+ /usr/share/univention-samba4/scripts/setup-s4.sh --binddn uid=Administrator,cn=users,dc=deadlock174,dc=local --bindpwd univention --site=schule2
WARNING: The following Samba 3 domaincontroller have been found:
         master1741
backup1742
         It is not possible to install a samba 4 domaincontroller 
         into a samba 3 environment.samba4/ignore/mixsetup is true.
         Continue as requested
Stopping Samba daemons: nmbd smbd.
Setting samba/autostart
Create winbind/autostart
Multifile: /etc/samba/smb.conf
Stopping Heimdal KDC: heimdal-kdc.
Setting kerberos/autostart
Create samba4/function/level
Multifile: /etc/samba/smb.conf
modifying entry "cn=Users,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Guests,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Power Users,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Replicators,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Administrators,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Printer-Admins,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=System Operators,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Backup Operators,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Account Operators,cn=groups,dc=deadlock174,dc=local"

ldap_modify: Server is unwilling to perform (53)
        additional info: no global superior knowledge
modifying entry "cn=Computers,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Slave Join,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Backup Join,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Domain Users,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Domain Admins,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Domain Guests,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Windows Hosts,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=DC Slave Hosts,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=DC Backup Hosts,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=lehrer-schule2,cn=groups,ou=schule2,dc=deadlock174,dc=local"

modifying entry "cn=admins-schule1,cn=ouadmins,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=admins-schule2,cn=ouadmins,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=schueler-schule2,cn=groups,ou=schule2,dc=deadlock174,dc=local"

modifying entry "cn=DC-Edukativnetz,cn=ucsschool,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=mitarbeiter-schule2,cn=groups,ou=schule2,dc=deadlock174,dc=local"

modifying entry "cn=DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Member-Edukativnetz,cn=ucsschool,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=deadlock174,dc=local"

modifying entry "cn=OUschule1-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=deadlock174,dc=loca"

Reading smb.conf
WARNING: The "idmap backend" option is deprecated
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
WARNING: The "use spnego" option is deprecated
Processing section "[netlogon]"
Processing section "[sysvol]"
Processing section "[IPC$]"
WARNING: No path in service IPC$ - making it unavailable!
NOTE: Service IPC$ is flagged unavailable.
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[homes]"
Processing section "[Marktplatz]"
Provisioning
no talloc stackframe around, leaking memory
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=DEADLOCK174))]
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 1 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 2 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 3 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 4 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 5 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 6 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 7 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 8 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 9 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 10 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 11 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 12 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 13 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 14 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 15 try!
ldap_initialize: Bad parameter to an ldap routine
Connection to LDAP server failed for the 16 try!
smbldap_search_domain_info: Problem during LDAPsearch: Timed out
smbldap_search_domain_info: Query was: dc=deadlock174,dc=local, (&(objectClass=sambaDomain)(sambaDomainName=DEADLOCK174))
pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
pdb backend ldapsam:"ldap://slave1744.deadlock174.local:None" did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)
ERROR(<class 'passdb.error'>): uncaught exception - Cannot load backend methods for 'ldapsam:"ldap://slave1744.deadlock174.local:None"' backend (-1073741606,NT_STATUS_CANT_ACCESS_DOMAIN_INFO)
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/__init__.py", line 135, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/samba/netcmd/domain.py", line 708, in run
    useeadb=eadb)
  File "/usr/lib/python2.6/dist-packages/samba/upgrade.py", line 516, in upgrade_from_samba3
    s3db = samba3.get_sam_db()
  File "/usr/lib/python2.6/dist-packages/samba/samba3/__init__.py", line 387, in get_sam_db
    return passdb.PDB(self.lp.get('passdb backend'))
Comment 3 Arvid Requate univentionstaff 2012-07-16 12:00:29 CEST
Das ist Bug 27539: Da war ldap/server/port noch nicht gesetzt und daher stand "None" als Port in der temporären /var/lib/samba3/smb.conf, die für das samba3upgrade verwendet wird.
Comment 4 Stefan Gohmann univentionstaff 2012-07-16 13:31:57 CEST
Das hat in meinem UCS@school Setup soweit funktioniert.
Comment 5 Stefan Gohmann univentionstaff 2012-07-20 15:25:09 CEST
UCS 3.0-2 has been released: 
  http://forum.univention.de/viewtopic.php?f=54&t=1905

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