restrict ldap search scope
This commit is contained in:
parent
eca9062e2f
commit
18ab4e9026
|
@ -24,7 +24,8 @@ ldap_conn.simple_bind_s(cfg.get('general', 'bind_dn'), options.bindpw)
|
|||
|
||||
users = []
|
||||
|
||||
for entry in ldap_conn.search_s("dc=win,dc=info,dc=pcf", ldap.SCOPE_SUBTREE, "objectclass=user"):
|
||||
for entry in ldap_conn.search_s("ou=ouGED,ou=ouPCF,ou=ouUsers,dc=win,dc=info,dc=pcf",
|
||||
ldap.SCOPE_SUBTREE, "objectclass=user"):
|
||||
if not entry[0]:
|
||||
continue
|
||||
if not entry[1].get('profilePath'):
|
||||
|
@ -46,6 +47,7 @@ for user in users:
|
|||
'mail': user.get('mail'),
|
||||
}
|
||||
vars.update(dict(cfg.items('variables')))
|
||||
print username
|
||||
print >> fd, '''[ged-gen-%(mail)s]
|
||||
default_type = dmsdocument
|
||||
default_directory = Members/%(username)s
|
||||
|
|
Reference in New Issue