Source

iredmail / iRedMail / functions / openldap.sh

Diff from to

File iRedMail/functions/openldap.sh

 
 openldap_config()
 {
-    ECHO_INFO "Configure OpenLDAP server."
+    ECHO_INFO "Configure OpenLDAP server (Storing mail accounts)."
 
     ECHO_DEBUG "Stoping OpenLDAP."
     ${LDAP_RC_SCRIPT} stop &>/dev/null
 objectClass: top
 ou: ${LDAP_ATTR_GROUP_EXTERNALS}
 
-dn: ${LDAP_ATTR_USER_RDN}=${DOMAIN_ADMIN_NAME}@${FIRST_DOMAIN},${LDAP_ADMIN_BASEDN}
-objectClass: ${LDAP_OBJECTCLASS_MAILADMIN}
-objectClass: shadowAccount
-objectClass: top
-cn: ${DOMAIN_ADMIN_NAME}
-uid: ${DOMAIN_ADMIN_NAME}
-givenName: ${DOMAIN_ADMIN_NAME}
-${LDAP_ATTR_USER_RDN}: ${DOMAIN_ADMIN_NAME}@${FIRST_DOMAIN}
-${LDAP_ATTR_ACCOUNT_STATUS}: ${LDAP_STATUS_ACTIVE}
-${LDAP_ATTR_USER_PASSWD}: $(gen_ldap_passwd "${DOMAIN_ADMIN_PASSWD}")
-${LDAP_ATTR_DOMAIN_GLOBALADMIN}: ${LDAP_VALUE_DOMAIN_GLOBALADMIN}
-${LDAP_ENABLED_SERVICE}: ${LDAP_SERVICE_AWSTATS}
-
 dn: ${LDAP_ATTR_USER_RDN}=${FIRST_USER}@${FIRST_DOMAIN},${LDAP_ATTR_GROUP_RDN}=${LDAP_ATTR_GROUP_USERS},${LDAP_ATTR_DOMAIN_RDN}=${FIRST_DOMAIN},${LDAP_BASEDN}
 objectClass: inetOrgPerson
 objectClass: shadowAccount
 ${LDAP_ENABLED_SERVICE}: ${LDAP_SERVICE_DISPLAYED_IN_ADDRBOOK}
 ${LDAP_ENABLED_SERVICE}: ${LDAP_SERVICE_SHADOW_ADDRESS}
 ${LDAP_ENABLED_SERVICE}: ${LDAP_SERVICE_LIB_STORAGE}
+${LDAP_ENABLED_SERVICE}: ${LDAP_SERVICE_DOMAIN_ADMIN}
+${LDAP_ATTR_DOMAIN_GLOBALADMIN}: yes
 EOF
 
     ldapadd -x -D "${LDAP_ROOTDN}" -w "${LDAP_ROOTPW}" -f ${LDAP_INIT_LDIF} >/dev/null