Univention Bugzilla – Attachment 4487 Details for
Bug 24433
univention-ldap-overlay-memberof funktionier nicht wie dokumentiert
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
readd-uniquemember.py
readd-uniquemember.py (text/x-python), 753 bytes, created by
Felix Botner
on 2012-06-28 09:29:23 CEST
(
hide
)
Description:
readd-uniquemember.py
Filename:
MIME Type:
Creator:
Felix Botner
Created:
2012-06-28 09:29:23 CEST
Size:
753 bytes
patch
obsolete
>import univention.uldap >import univention.config_registry >import ldap >cr = univention.config_registry.ConfigRegistry() >cr.load() >try: > lo = univention.uldap.getAdminConnection() >except Exception, e: > print "failed to get ldap connection: %s" % e > >results = lo.search(base=cr.get("ldap/base"), attr=["uniqueMember"], filter="(&(objectClass=posixGroup)(uniqueMember=*))") >for result in results: > dn = result[0] > uniqueMember = result[1].get("uniqueMember", [""]) > if dn and uniqueMember: > print dn > print uniqueMember > try: > # delete uniqueMember > lo.modify(dn, [("uniqueMember", uniqueMember, [])]) > # add uniqueMember > lo.modify(dn, [("uniqueMember", [], uniqueMember)]) > except Exception, e: > print " modifing %s failed: %s" % (dn, e) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 24433
: 4487