diff --git a/seed/openldap/funcs/ldap.py b/seed/openldap/funcs/ldap.py index e0059c78..437e0fd8 100644 --- a/seed/openldap/funcs/ldap.py +++ b/seed/openldap/funcs/ldap.py @@ -6,7 +6,7 @@ from json import load as _load, dump as _dump from os.path import dirname as _dirname, abspath as _abspath, join as _join, isfile as _isfile -_HERE = _dirname(_abspath(__main__.__file__)) +_HERE = _dirname(_dirname(_abspath(__main__.__file__))) _SSHA_PASSWORD_DIR = _join(_HERE, 'password', 'ssha.json') diff --git a/seed/openldap/templates/users_mod.ldif b/seed/openldap/templates/users_mod.ldif index 1bdcdb45..2d702fa0 100644 --- a/seed/openldap/templates/users_mod.ldif +++ b/seed/openldap/templates/users_mod.ldif @@ -19,7 +19,7 @@ userPassword:: %%ssha_encode(%%password) %end for # Users -%set %%userdn = 'cn=' + %%username + ',' + %%ldapclient_base_dn +%set %%userdn = 'cn=' + %%username + ',' + %%calc_ldapclient_base_dn(%%ldapclient_base_dn) %set %%userfamilydn = 'cn=' + %%username_family + ',' + %%calc_ldapclient_base_dn(%%ldapclient_base_dn, family_name=%%name_family) %set %%acc = [(%%userdn, %%username, ['alias_' + %%username]), (%%userfamilydn, %%username_family, ['alias_' + %%username_family]),