dataset/seed/applicationservice/2022.03.08/openldap/templates/users_mod.ldif
2022-06-26 19:33:44 +02:00

45 lines
1.2 KiB
Text

# Remote
%for %%remote in %%accounts.remotes
%set %%name = %%normalize_family(%%remote)
dn: %%accounts['remote_' + %%name]['dn_' + %%name]
changetype: modify
replace: userPassword
userPassword:: %%ssha_encode(%%accounts['remote_' + %%name]['password_' + %%name])
%end for
# Users
%set %%users = %%ldap_user_dn
%for %%user in %%accounts.users.ldap_user_mail
dn: cn=%%user,%%users
changetype: modify
#add: objectClass
#objectClass: inetLocalMailRecipient
#-
replace: mailLocalAddress
mailLocalAddress: %%user
%if %%user.ldap_user_aliases
%for %%alias in %%user.ldap_user_aliases
mailLocalAddress: %%alias
%end for
%end if
%end for
# Families
%for %%family in %%accounts.families
%set %%families = %%calc_ldapclient_base_dn(%%ldapclient_base_dn, %%family)
%for %%user in %%accounts['family_' + %%family]['users_' + %%family]['ldap_user_mail_' + %%family]
dn: cn=%%user,%%families
changetype: modify
#add: objectClass
#objectClass: inetLocalMailRecipient
#-
replace: mailLocalAddress
mailLocalAddress: %%user
%if %%user['ldap_user_aliases_' + %%family]
%for %%alias in %%user['ldap_user_aliases_' + %%family]
mailLocalAddress: %%alias
%end for
%end if
%end for
%end for