This section explains how to configure the LDAP schema in the openldap pod.


  1. Login to the openldap pod, using following steps:
    1. Run the command: kubectl get pods --namespace vmware-smarts | grep openldap.
    2. Use the podID to login : kubectl exec -it openldap-f855cbc58-st5n2 --namespace vmware-smarts bash.
    3. Run the command : cd /opt/bitnami/openldap/sbin
    4. Execute:
      i ) Provide desired password
      ii) Note down the SSHA hash
  2. Configure the schema:
    1. Update the db.ldif file sha password to the value obtained as part of the output step 1.d.
    2. Copy the base.ldif, monitor.ldif, smarts_engineer.ldif, users.ldif, db.ldif files to a folder on the pod. For example, to copy the above file, the command is: kubectl cp db.ldif openldap-f855cbc58-lc57k:/tmp --namespace vmware-smarts
    3. Login to the pod's folder and execute the following commands:
      i) ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif
      ii) ldapmodify -Y EXTERNAL -H ldapi:/// -f monitor.ldif
      iii) ldapadd -x -W -h openldap -p 1389 -D "cn=ldapadmin,dc=tco,dc=com" -f base.ldif
                  provide passwd as given in slappasswd.
      iv) ldapadd  -Y EXTERNAL -H ldapi:/// -f  smarts_engineer.ldif
       V) ldapadd -x -W -h openldap -p 1389 -D "cn=ldapadmin,dc=tco,dc=com" -f users.ldif