开发者

How can I use Perl to test for Win32 group membership when group contains nested groups?

开发者 https://www.devze.com 2023-01-19 02:29 出处:网络
I\'m trying to use Perl to determine if a Windows users is a member of a Windows group, if the the group contains nested groups.

I'm trying to use Perl to determine if a Windows users is a member of a Windows group, if the the group contains nested groups.

I've tried using Win32:开发者_如何学JAVA:NetAdmin::GroupIsMember(), but it only works if the user a direct member of the group.

I'm not a AD or LDAP expert, but the examples I googled for exhibit the same behavior.

For example, User "joe" is a member of the group "A". Group "A" is a member of group "B". I want to test to see if joe is member of "B".


You could either use recursion to scan through the AD or (better) enumerate group membership through the SID's. See the following for an example: http://explodingcoder.com/blog/content/how-query-active-directory-security-group-membership

0

精彩评论

暂无评论...
验证码 换一张
取 消