diff --git a/bootstrap/init.py b/bootstrap/init.py index 8591ebf..2c7dc8d 100644 --- a/bootstrap/init.py +++ b/bootstrap/init.py @@ -14,8 +14,8 @@ INITIALIZED_FLAG = Path("/var/lib/ldap/.initialized") SLAPD_D = Path("/etc/ldap/slapd.d") -base_dn = os.environ["LDAP_BASE_DN"] -password = os.environ["LDAP_PASSWORD"] +base_dn = os.environ.get("LDAP_BASE_DN") or "dc=example,dc=org" +password = os.environ.get("LDAP_PASSWORD") or "changeit" tls_enabled = os.environ.get("TLS_ENABLED") == "1" admin_dn = f"cn=admin,{base_dn}" diff --git a/env.example b/env.example index 858d4ab..97cc934 100644 --- a/env.example +++ b/env.example @@ -1,5 +1,5 @@ -LDAP_DOMAIN=example.com -LDAP_BASE_DN=dc=example,dc=com +LDAP_DOMAIN=example.org +LDAP_BASE_DN=dc=example,dc=org LDAP_ORG=Example Organization -LDAP_PASSWORD=ChangeMe123! -LDAP_ADMIN_PASSWORD=ChangeMe123! +LDAP_PASSWORD=changeit +LDAP_ADMIN_PASSWORD=changeit