• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 799
  • Last Modified:

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?
0
ralph_rea
Asked:
ralph_rea
  • 3
  • 3
1 Solution
 
Mike KlineCommented:
You can use an LDAP filter to search for attributes if you know the attribute so for example if you want to search for all users that have their phone number populated (or not) you can do that.

You can also dump all the information using something like csvde

csvde -f addump.csv

Thanks

Mike
0
 
ralph_reaAuthor Commented:
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?
0
 
Mike KlineCommented:
I know how to do it in AD but added the Linux topic so those guys can help.

Thanks

Mike
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
ralph_reaAuthor Commented:
How can I do in AD?
I'd like to dump the list of all users  and all attributes.
0
 
ralph_reaAuthor Commented:
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?
0
 
Mike KlineCommented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now