Need to find the ldap id's of all the users in my organizations... is there any command???
What�s with ldapsearch?
ldapsearch -b "dc=example,dc=de" -h LDAPSERVER -p PORTNUMBER "(&(objectClass=posixAccount)(uid=*))"
The same + a grep filter (to see only the uid with name) :
ldapsearch -b "dc=example,dc=de" -h LDAPSERVER -p PORTNUMBER "(&(objectClass=posixAccount)(uid=*))" | grep uid:
This is an example for a simple bind connection to the ldap-server. if u use SSL/TLS, so have a look at "man ldapsearch" for the correct syntax and extra options.
best regards
ldapsearch -b "dc=example,dc=de" -h LDAPSERVER -p PORTNUMBER "(&(objectClass=posixAccount)(uid=*))" | grep uid:
---------- Post updated at 02:57 PM ---------- Previous update was at 02:57 PM ----------
ldap_search: Can't connect to the LDAP server - Unknown error
How is your LDAP-Server configured ? Is it a Openldap-Server (config > slapd.conf)? Is anonymous Bind allowed or forbidden or an ACL ? How your clients connect to the ldap-server?
When connected to a Solaris LDAP client, you can run this command:
ldaplist passwd
To view all attributes, run
ldaplist -l passwd