Bug 26203 - S4 Connector: Tracebacks beim Join auf einem Slave DC
S4 Connector: Tracebacks beim Join auf einem Slave DC
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Stefan Gohmann
Felix Botner
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-21 11:39 CET by Felix Botner
Modified: 2012-07-20 15:25 CEST (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

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2012-02-21 11:39:53 CET
Wenn der S4 Connector auf einem Slave gejoint wird, gibt es folgende Fehlermeldungen.


+ univention-config-registry get connector/s4/allow/secondary
+ value=yes
+ tr [:upper:] [:lower:]
+ echo -n yes
+ return 0
+ [ -n  ]
+ [ -e /etc/samba4.secret ]
+ [ 0 -le 0 ]
+ /usr/share/univention-heimdal/salt_krb5Keys
salt_krb5Keys: Without explicit credentials this only works on a Master or Backup server.
+ /usr/sbin/univention-password_sync_ucs_to_s4 Administrator
Traceback (most recent call last):
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 160, in <module>
    main()
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 154, in main
    s4 = S4(options.ucrbase)
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 54, in __init__
    self.open_s4()
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 78, in open_s4
    ldap_bindpw_s4 = open(self.ucr['%s/s4/ldap/bindpw' % self.ucrbase]).read().strip('\n')
IOError: [Errno 2] No such file or directory: '/etc/samba4.secret'
+ [ 1 != 0 ]
+ /etc/init.d/samba4 restart
Stopping Samba 4 daemon: samba.
Starting Samba 4 daemon: samba.
Restarting bind9 daemon: .
done.
+ sleep 3
+ /usr/sbin/univention-password_sync_ucs_to_s4 Administrator
Traceback (most recent call last):
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 160, in <module>
    main()
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 154, in main
    s4 = S4(options.ucrbase)
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 54, in __init__
    self.open_s4()
  File "/usr/sbin/univention-password_sync_ucs_to_s4", line 78, in open_s4
    ldap_bindpw_s4 = open(self.ucr['%s/s4/ldap/bindpw' % self.ucrbase]).read().strip('\n')
IOError: [Errno 2] No such file or directory: '/etc/samba4.secret'
+ /usr/share/univention-s4-connector/sync_krbtgt
Traceback (most recent call last):
  File "/usr/share/univention-s4-connector/sync_krbtgt", line 189, in <module>
    main()
  File "/usr/share/univention-s4-connector/sync_krbtgt", line 183, in main
    s4 = S4(options.ucrbase)
  File "/usr/share/univention-s4-connector/sync_krbtgt", line 54, in __init__
    self.open_s4()
  File "/usr/share/univention-s4-connector/sync_krbtgt", line 78, in open_s4
    ldap_bindpw_s4 = open(self.ucr['%s/s4/ldap/bindpw' % self.ucrbase]).read().strip('\n')
IOError: [Errno 2] No such file or directory: '/etc/samba4.secret'
+ ucs_addServiceToLocalhost S4 Connector
+ local server_role ldap_base ldap_hostdn
+ local servicename=S4 Connector
+ ucr shell server/role ldap/base ldap/hostdn
+ eval ldap_base="dc=as,dc=df"
ldap_hostdn="cn=slave,cn=dc,cn=computers,dc=as,dc=df"

In meiner Umgebung hat der Connector dann trotzdem funktioniert, ich hatte den aber vorher auch schon auf dem Master installiert, so dass dort "/usr/share/univention-heimdal/salt_krb5Keys" etc. bereits erfolgreich ausgeführt wurden. 

Es wäre noch einmal zu testen, ob der Connector auf dem Slave auch funktioniert, wenn er dort zum ersten mal in der Domäne installiert wird.
Comment 1 Stefan Gohmann univentionstaff 2012-04-17 07:51:49 CEST
Wurde zusammen mit Bug #26505 behoben.
Comment 2 Felix Botner univentionstaff 2012-06-29 11:42:27 CEST
UCS 3.0-2 Master (ohne Samba) UCS 3.0-2 Slave (mit samba4)

Das univention-samba4 Join Skript läuft nun zwar durch, jedoch kann der connector nicht gestartet werden.

/var/log/univention/connector-s4-status.log:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/s4connector/s4/main.py", line 253, in main
    connect()
  File "/usr/lib/pymodules/python2.6/univention/s4connector/s4/main.py", line 162, in connect
    baseConfig['%s/s4/listener/dir' % CONFIGBASENAME])
  File "/usr/lib/pymodules/python2.6/univention/s4connector/s4/__init__.py", line 653, in __init__
    univention.s4connector.ucs.__init__(self, CONFIGBASENAME, property, baseConfig, listener_dir)
  File "/usr/lib/pymodules/python2.6/univention/s4connector/__init__.py", line 410, in __init__
    self.open_ucs()
  File "/usr/lib/pymodules/python2.6/univention/s4connector/__init__.py", line 424, in open_ucs
    bindpw=open(bindpw_file).read()
IOError: [Errno 2] No such file or directory: '/etc/ldap.secret'
Comment 3 Felix Botner univentionstaff 2012-06-29 11:50:36 CEST
Nachdem ich 

ucr set connector/ldap/bindpw?"/etc/machine.secret"
ucr set connector/ldap/binddn?"$ldap_hostdn"
ucr set connector/ldap/server?"$hostname.$domainname"
ucr set connector/s4/allow/secondary?'true'
ucr set connector/s4/mapping/dns/syncmode?'write'

auf dem Slave gesetzt habe, läuft der connector (wird auch in ucs@school gemacht).
Comment 4 Stefan Gohmann univentionstaff 2012-06-29 12:32:46 CEST
(In reply to comment #3)
> Nachdem ich 
> 
> ucr set connector/ldap/bindpw?"/etc/machine.secret"
> ucr set connector/ldap/binddn?"$ldap_hostdn"
> ucr set connector/ldap/server?"$hostname.$domainname"

Diese werden jetzt auf nicht DC Master und nicht DC Backup gesetzt.
Comment 5 Felix Botner univentionstaff 2012-06-29 13:32:26 CEST
OK

nachdem ich dem Slave zusätzlich noch vollen Schreibzugriff auf das LDAP des Masters gegeben habe, funktioniert der Connector. Domain Join/Anmeldung über Win7 (mit dem Slave als Samba DC) klappt ebenfalls.

Changelog Eintrag vorhanden.
Comment 6 Stefan Gohmann univentionstaff 2012-07-20 15:25:12 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".