Gilberto Nunes wrote:
I want use ldapsearch to query a Active Directory Server. I am use this :
ldapsearch -LLL -x -b dc=selbetti,dc=local -H ldap://host -D proxy_user '(|(objectClass=person)(objectClass=user))' -w password
This command bring me all entries.
I like filter only two attributes: cn and mail.
Please see:
man 1 ldapsearch
=> Just append the attributes wanted to the command line.
ldapsearch -LLL -x -b dc=selbetti,dc=local -H ldap://host -D proxy_user '(|(objectClass=person)(objectClass=user))' -w password cn mail
Ciao, Michael.