ldapsearch -h target -x -s base namingcontexts
# -x specifies simple authentication -h specifies the host -s specifies the scope
ldapsearch -h target -x -b "DC=domain,DC=com"
# -b specifies the base DN for search
ldapsearch -x -h target -b "DC=domain,DC=com" "objectclass=*"
# searching for object class of any