aspose file tools*
The moose likes Security and the fly likes Query for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
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: 387

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: 18987
    
    8

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: 387

Thanks Paul. I knew I was doing something stupid. I appreciate the help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query for "ACTIVE" users in LDAP server NOT working