QA: How can I use ldapsearch in Nubus / Opendesk

Question

How can I use ldapsearch in my Nubus Environment?

Answer

You need to receive the corresponding admin dn, credentials etc. and perform the command inside the LDAP Pod at best. The following scheme may be used for that:

kubectl exec -n ${NAMESPACE?} ums-ldap-server-primary-0 -- ldapsearch -x \
  -D "$(kubectl get -n ${NAMESPACE?} configmaps ums-ldap-server-primary -o json | jq -r '.data.ADMIN_DN')" \
  -w "$(kubectl get -n ${NAMESPACE?} secrets ums-ldap-server-admin -o json | jq -r '.data.password' | base64 -d)" \
  -b "$(kubectl get -n ${NAMESPACE?} configmaps ums-ldap-server-primary -o json | jq -r '.data.LDAP_BASEDN')" \
  uid=Administrator

This topic was automatically closed after 24 hours. New replies are no longer allowed.