Q&A: How to use ldapsearch to get the LDAP information for a user

Question

How to use ldapsearch to get the LDAP information for a user?

Answer

The following command will print the attributes of the user:

ldapsearch -x -h backup.multi.ucs -p 7389 -LLL -D uid=Administrator,cn=users,$(ucr get  ldap/base) uid=USERNAME -W
Mastodon