Bug 21732 - usr/lib/univention-server/server_password_change prüft nicht ob der Master erreichbar ist
usr/lib/univention-server/server_password_change prüft nicht ob der Master er...
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: Password changes
UCS 2.4
Other Linux
: P5 minor (vote)
: ---
Assigned To: Bugzilla Mailingliste
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-04 14:07 CET by Michael Basse
Modified: 2013-03-24 17:37 CET (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 Michael Basse univentionstaff 2011-03-04 14:07:00 CET
usr/lib/univention-server/server_password_change liefert folgenden Traceback, wenn der LDAP-Server des Masters nicht erreichbar ist.

Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 231, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 478, in doit
    co=univention.admin.config.config(baseConfig['ldap/master'])
  File "/usr/lib/python2.4/site-packages/univention/admin/config.py", line 36, in __init__
    base=univention.admin.uldap.getBaseDN(host)
  File "/usr/lib/python2.4/site-packages/univention/admin/uldap.py", line 50, in getBaseDN
    result=l.search_s('',ldap.SCOPE_BASE,'objectClass=*',['NamingContexts'])
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 508, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 501, in search_ext_s
    msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 497, in search_ext
    timeout,sizelimit,
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
    result = func(*args,**kwargs)
SERVER_DOWN: {'desc': "Can't contact LDAP server"}

failed to change server password for dn=hostname-des-accounts

Es sollte vor Ausführung geprüft werden, ob der Master über das Netzwerk erreicht werden kann, so dass es keinen Traceback in den Log-Dateien gibt sondern eine saubere Fehlermeldung
Comment 1 Jascha Geerds univentionstaff 2011-03-15 12:06:32 CET
2.4-2 Slave (welcher nicht gejoint ist)

udm computers/domaincontroller_slave create --set name=test-slave
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 480, in doit
    co=univention.admin.config.config(baseConfig['ldap/master'])
  File "/usr/lib/python2.4/site-packages/univention/admin/config.py", line 38, in __init__
    base=univention.admin.uldap.getBaseDN(host)
  File "/usr/lib/python2.4/site-packages/univention/admin/uldap.py", line 52, in getBaseDN
    result=l.search_s('',ldap.SCOPE_BASE,'objectClass=*',['NamingContexts'])
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 508, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 501, in search_ext_s
    msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 497, in search_ext
    timeout,sizelimit,
  File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
    result = func(*args,**kwargs)
SERVER_DOWN: {'desc': "Can't contact LDAP server"}

Sollte abgefangen werden, wenn das System nicht gejoint ist bzw. wenn der Master nicht erreichbar ist.
Comment 2 Stefan Gohmann univentionstaff 2013-03-24 17:37:25 CET
Mit UCS 3.1-1:

# /usr/lib/univention-server/server_password_change
failed to contact LDAP server: cannot connect with univention-ldapsearch