3

我听说过——我不确定它是来自可靠的来源还是来自实际做过的人——JNDI 可用于在 Windows 中访问用户的组名。我正在使用Windows XP。我不确定它是如何工作的,但听起来 Windows 使用活动目录来管理组(有人可以确认吗?)并且 JNDI 可能能够访问它来检索用户的组名。当我说“组”时,我指的是计算机上的组。像“管理员”或“用户”。

有谁知道如何做到这一点?有人做过吗?这是一件容易的事吗?

4

3 回答 3

1

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

于 2009-02-02T12:49:15.893 回答
0

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.

于 2009-02-02T12:22:19.177 回答
0

我对它可能需要做什么有一个想法,但还没有测试我的理论。

Active Directory 支持以 LDAP 方式访问,因此也许您可以使用有关 JNDI 和 LDAP 的教程来访问 Active Directory。

Active Directory的维基百科页面提到它是网络管理员可以用来在网络上传播更新的东西,也许这就是您的(可靠的)来源所指的组。如果它也适用于 Microsoft Windows 的常规版本,如 XP,那么它应该很容易设置。

于 2009-01-29T14:06:01.967 回答