Skip to content

Commit

Permalink
feat: secure ldap rootpw
Browse files Browse the repository at this point in the history
  • Loading branch information
giem-git committed Sep 16, 2024
1 parent 0327a9d commit 89449b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions roles/ldap_kerberos/tasks/install_openldap_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
mode: "0644"
notify: restart slapd

- name: Configure slapd_password.conf
template:
src: slapd_password.conf.j2
dest: /etc/openldap/slapd_password.conf
owner: ldap
group: ldap
mode: "0600"
notify: restart slapd

- name: Configure /etc/sysconfig/slapd
template:
src: sysconfig-slapd.j2
Expand Down
3 changes: 2 additions & 1 deletion roles/ldap_kerberos/templates/slapd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ access to *
database bdb
suffix "{{ ldap_suffix }}"
rootdn "{{ ldap_rootdn }}"
rootpw {{ ldap_rootpw }}
# rootpw
include /etc/openldap/slapd_password.conf
directory {{ ldapdb_dir }}
sizelimit unlimited
index objectClass,uid,mail,cn eq,pres
Expand Down
3 changes: 3 additions & 0 deletions roles/ldap_kerberos/templates/slapd_password.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# {{ ansible_managed }}

rootpw {{ ldap_rootpw }}

0 comments on commit 89449b1

Please sign in to comment.