diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-09-24 22:35:45 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-09-24 22:35:45 -0400 |
commit | 6e00c9e8137aae1fb8dd568a62d9fb5fc4a277cb (patch) | |
tree | 9279f7a330affbb5da6a1f147739b8dfd92d4a19 /scripts/hostclass/idm_server/10-slapd | |
parent | d9c18b3fcb9b036b6cdf69397828b59ab4c53091 (diff) | |
download | infrastructure-6e00c9e8137aae1fb8dd568a62d9fb5fc4a277cb.tar.gz |
finish up idm_server hostclass
Diffstat (limited to 'scripts/hostclass/idm_server/10-slapd')
-rw-r--r-- | scripts/hostclass/idm_server/10-slapd | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/hostclass/idm_server/10-slapd b/scripts/hostclass/idm_server/10-slapd index dc52a58..204c405 100644 --- a/scripts/hostclass/idm_server/10-slapd +++ b/scripts/hostclass/idm_server/10-slapd @@ -10,10 +10,13 @@ : ${slapd_syncrepl_session_log:='1000'} : ${slapd_syncrepl_cleanup_age:='7'} : ${slapd_syncrepl_cleanup_interval:='1'} +: ${slapd_admin_role:='role-ldap-admin'} slapd_user=ldap slapd_data_dir=/var/db/openldap-data slapd_conf_dir=/usr/local/etc/openldap +slapd_socket=/var/run/openldap/ldapi +slapd_ldapi_uri="ldapi://$(echo "$slapd_socket" | sed 's|/|%2f|g')" slapd_tls_cert="${slapd_conf_dir}/slapd.crt" slapd_tls_key="${slapd_conf_dir}/slapd.key" slapd_replicator_tls_cert="${slapd_conf_dir}/replicator.crt" @@ -72,8 +75,8 @@ fi sysrc -v \ slapd_enable=YES \ slapd_cn_config=YES \ - slapd_flags="-h 'ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/ ldaps://0.0.0.0/ ldaps://${BOXCONF_DEFAULT_IPV4}/'" \ - slapd_sockets="/var/run/openldap/ldapi" \ + slapd_flags="-h '${slapd_ldapi_uri}/ ldap://0.0.0.0/ ldaps://0.0.0.0/ ldaps://${BOXCONF_DEFAULT_IPV4}/'" \ + slapd_sockets="$slapd_socket" \ slapd_krb5_ktname="$slapd_keytab" service slapd restart @@ -151,6 +154,12 @@ objectClass: organizationalUnit ou: $(ldap_rdn_value "$roles_basedn") EOF + # cn=role-ldap-admin,ou=roles,ou=groups,ou=accounts,dc=example,dc=com + ldap_add "cn=${slapd_admin_role},${roles_basedn}" <<EOF +objectClass: groupOfMembers +cn: ${slapd_admin_role} +EOF + # ou=automount,dc=example,dc=com ldap_add "$automount_basedn" <<EOF objectClass: organizationalUnit |