Link to home
Start Free TrialLog in
Avatar of ralph_rea
ralph_rea

asked on

LDAP filter to find unused attributes

Hi,
from LDAP I'd like to determine which attributes are unused, I want to find entries where the attributes are present but are unused or has a null value (i.e. an empty/blank string).

Can I do this using an LDAP filter (ldapsearch), and if so, how?
ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ralph_rea
ralph_rea

ASKER

I'd like to search the attribute (i.e. phone number) that have null value for all users, which sintax must I use?

my O.S. is linux, how can I dump all the information?
I know how to do it in AD but added the Linux topic so those guys can help.

Thanks

Mike
How can I do in AD?
I'd like to dump the list of all users  and all attributes.
I tried this for list of all users:

ldapsearch -h myhost -p 3060 -D "cn=orcladmin" -w password -b dc=gca,dc=net "(&(uid=*))" -L dn attrthatnotexist >> list_all_users.ldif

but I get all user with

uid=user1,cn=users,dc=gca,dc=net

uid=user2,cn=users,dc=gca,dc=net

uid=user3,cn=users,dc=gca,dc=net

uid=user4,cn=users,dc=gca,dc=net

.......................................................

How can I do it for all attributes?
So in the AD example you want to see every user that doesn't have the telephone number attribute populated?

In your example above you are just searching for any object that has uid populated

Thanks

Mike