Query an LDAP server with a no-newline password file for all items that are a member of the given group and return the object's displayName value


  • CLI utility for querying an LDAP directory.
    More information: <https://docs.ldap.com/ldap-sdk/docs/tool-usages/ldapsearch.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ldapsearch -D '{{admin_DN}}' -y '{{password_file}}' -h {{ldap_host}} -b {{base_ou}} '{{memberOf=group1}}' displayName

click the source code to copy install ldapsearch on any operating system with command-not-found.com