The moose likes Security and the fly likes Query for Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Query for "ACTIVE" users in LDAP server NOT working" Watch "Query for "ACTIVE" users in LDAP server NOT working" New topic
Author

Query for "ACTIVE" users in LDAP server NOT working

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 372
I need to be able to get via querying the active directory using the LDAP server a list of defined "ACTIVE" users from the active directory using the accountExpires attribute.

I have tried to do this via a successful connection to my ldap server. In the java code below I get back ONLY 1 record when using the accountExpires attribute. I should get back a list of records with each record displaying the DISPLAY NAME and MAIL attribute from the ldap server.

I'm sure it's something stupid I'm NOT doing.

ANY help/direction would be appreciated. Regards.

Here is my code:

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

Have you considered using a while-loop to process all the entries in the NamingEnumeration, instead of just processing the first entry?
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 372
Thanks Paul. I knew I was doing something stupid. I appreciate the help.
 
IntelliJ Java IDE
 
subject: Query for "ACTIVE" users in LDAP server NOT working
 
Threads others viewed
LDAP Connection.
LDAP and NamingEnumeration
LDAP question on syntax in search filter
Problem with Return type for LDAP Search
LDAP: error
IntelliJ Java IDE