dataset/seed/openldap/templates/users_mod.ldif

46 lines
1.2 KiB
Text
Raw Normal View History

2022-03-15 12:12:09 +01:00
# 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
2022-05-23 08:54:15 +02:00
# Users
2022-06-26 19:33:44 +02:00
%set %%users = %%ldap_user_dn
2022-05-23 08:54:15 +02:00
%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
2022-06-24 19:00:16 +02:00
%set %%families = %%calc_ldapclient_base_dn(%%ldapclient_base_dn, %%family)
2022-05-23 08:54:15 +02:00
%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