[Date Prev][Date Next] [Chronological] [Thread] [Top]

Unable to get "member"s for certain groups in AD using JNDI



I am trying to get members of a group in an Active
Directory
using JNDI.

I am able to list all groups, but I am not able to get
members
of certain groups (the ones created by the system -
like WINS users).
However I am able to list members of groups which I
created.

However, if I use AD browser, I am able to see the
members in the 
"member" tab of the group.

This is the code I use, any help in this regard would
be highly
appreciated.


String SEARCHBASE = "cn=users,dc=foo,dc=com";
String FILTER = "(objectCategory=Group)";

try {
	
	// Create the initial directory context
	DirContext ctx = new InitialDirContext(env);
	SearchControls constraints = new SearchControls();

constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
	NamingEnumeration result = ctx.search(SEARCHBASE, 
FILTER, constraints);

	// iterate and print attributes here

	ctx.close();
} catch (NamingException e) {
	System.err.println("Problem getting attribute: " +
e);
} catch (Exception ex) {
	ex.printStackTrace();
}



	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html