CmdID

CmdID / Commands

ldapsearch

Query an LDAP directory. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Query an LDAP server for all items that are a member of the given group and return the object's displayName value

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host --baseDN base_ou 'memberOf=group1' displayNameIdentify

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

ldapsearch --bindDN 'admin_DN' --keyStorePasswordFile 'password_file' --hostname ldap_host --baseDN base_ou 'memberOf=group1' displayNameIdentify

Return 5 items that match the given filter

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host --baseDN base_ou 'memberOf=group1' --sizeLimit 5 displayNameIdentify

Wait up to 7 seconds for a response

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host --baseDN base_ou 'memberOf=group1' --timeLimitSeconds 7 displayNameIdentify

Invert the filter

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host --baseDN base_ou '(!(memberOf=group1))' displayNameIdentify

Return all items that are part of multiple groups, returning the display name for each item

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host '(&(memberOf=group1)(memberOf=group2)(memberOf=group3))' "displayName"Identify

Return all items that are members of at least 1 of the specified groups

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host '(|(memberOf=group1)(memberOf=group1)(memberOf=group3))' displayNameIdentify

Combine multiple boolean logic filters

ldapsearch --bindDN 'admin_DN' --bindPassword 'password' --hostname ldap_host '(&(memberOf=group1)(memberOf=group2)(!(memberOf=group3)))' displayNameIdentify