• Post Reply Bookmark Topic Watch Topic
  • New Topic

retriving users details from LDAP server  RSS feed

 
Amol Juvatkar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends ,
I am able to retrive and display all users with theirs groups from Tivoli LDAP server.
by following instructions from

http://www-128.ibm.com/developerworks/tivoli/library/t-ldap01/#main

But my requirement is to display all those users which do not associate with any group,

how can I do that ??

Thanks
JAmol
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to perform "search" on the DirContext for your filter criteria.
Basic way will be to retrieve all the users and check for the group attribute. If it's null then you can print the users without the group.

The efficient way will be to use
DirContext.search()
by checking for empty group attribute, something like below



memberof is group attribute in your ldap directory.

For more information about LDAP operations look here
http://java.sun.com/products/jndi/tutorial/basics/directory/index.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!