views:

494

answers:

3

Hi all,

I have heard - and I'm not sure if it was from a credible source or from someone who actually has done it - that JNDI can be used to access a user's group name in windows. I am using Windows XP. I'm not sure how it works exactly but it sounds windows uses active directory to manage groups (can someone confirm?) and JNDI might be able to access it to retrieve a user's group name. When I say "group" I mean the group on the computer. Like "administrator" or "user."

Does anyone know how this might be done? Has anyone done this? Is it an easy task?

Your suggestions and experiences would help me greatly.

Thanks in advance (though I don't expect to get any reply)

Jbu

A: 

I have an idea about what it might take to do it, but haven't tested my theory yet.

Active Directory supports access in an LDAP way, so maybe you could use tutorials on JNDI and LDAP to get access to an Active Directory.

The Wikipedia page of Active Directory mentions it is something network administrators can use to spread updates across the network, maybe that's the groups your (credible) source refers to. If it also works for regulars editions of Microsoft Windows, like XP, then it should be easy to setup.

Gressie
A: 

You can try to do that via WMI as well. It seems not quite easy, and certainly it will require a handy help from your sysadmin.

aldrinleal
+1  A: 

You can use JNDI as the API to access LDAP, where user/group information are frequently stored.

I'd try and provide you with more details, but I'm really not an expert in this. Instead, I'd recommend you have a look at how Tomcat does this by looking at its JNDIRealm: http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JNDIRealm

Jack Leow