Tâche #28479
Scénario #28295: Évolutions AD identifiées suite à expertise
Lorsque l'on crée un partage, il faut attendre que le groupe associé soit synchronisé dans AD avant de poser les ACL
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Start date:
04/29/2019
Due date:
% Done:
0%
Estimated time:
0.00 h
Remaining (hours):
0.0
Associated revisions
ldapconf.conf : add AD vars
Ref: #28479
ldapconf.conf : fix format
Ref: #28479
ldapconf.py : add AD vars
Ref: #28479
ldapconf.conf : add "ad_address"
Ref: #28479
Add AD ldap requests lib
Ref: #28479
History
#1 Updated by Joël Cuissinat almost 2 years ago
Exemple de code pour vérifier :
# -*- coding: UTF-8 -*- import ldap aduser = "Administrator" rdn = "DC=domscribe,DC=ac-test,DC=fr" pwdfile = "/root/.eolead" ad_ldaps = "oui" server = '192.0.2.2' aduser = "CN={0},CN=Users,{1}".format(aduser, rdn) adpwd = file(pwdfile).read().strip() # OPT_REFERRALS=0 is mandatory for AD ldap.set_option(ldap.OPT_REFERRALS, 0) if ad_ldaps == "oui": ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) connexion = ldap.initialize('ldaps://'+server) else: connexion = ldap.initialize('ldap://'+server) connexion.simple_bind_s(aduser, adpwd) groups = ['professeurs', 'inconnu', 'eleves', 'truc'] ldb_filter = '(&(objectclass=group)(cn={}))' for group in groups: res = connexion.search(rdn, ldap.SCOPE_SUBTREE, ldb_filter.format(group), ['cn']) print connexion.result(res)[1][0][0]
#2 Updated by Joël Cuissinat almost 2 years ago
- Status changed from Nouveau to En cours
#3 Updated by Joël Cuissinat almost 2 years ago
- Status changed from En cours to Résolu
#4 Updated by Joël Cuissinat almost 2 years ago
- Assigned To set to Joël Cuissinat
#5 Updated by Joël Cuissinat almost 2 years ago
- Status changed from Résolu to Fermé
- Remaining (hours) set to 0.0