ldapsearch -h $DOMAIN -D '$USER@$DOMAIN' -w $PASSWORD -b 'dc=$DOMAIN,dc=local'

Query LDAP, by auth method.

Command: Linux

References:

https://linux.die.net/man/1/ldapsearch