This commit is contained in:
William Mantly 2020-05-13 17:20:09 -04:00
parent acc6e6c336
commit f1925065af

View File

@ -5,6 +5,7 @@ set -e
org_name="Theta42"
domain="theta42.com"
password=$1
ldap_base="dc=theta42,dc=com"
echo "slapd slapd/internal/adminpw string $password" | debconf-set-selections
echo "slapd slapd/password1 string $password" | debconf-set-selections
@ -23,7 +24,7 @@ echo "slapd slapd/invalid_config boolean true" | debconf-set-selections
apt install -y slapd ldap-utils
echo '' > /etc/ldap/ldap.conf
echo 'BASE dc=theta42,dc=com' >> /etc/ldap/ldap.conf
echo 'BASE $ldap_base' >> /etc/ldap/ldap.conf
echo 'URI ldap://localhost' >> /etc/ldap/ldap.conf
ldapadd -Y EXTERNAL -H ldapi:/// -f files/sshkey.ldif