检测用户是否在一个组中 [英] Detect if user is in a group

查看:23
本文介绍了检测用户是否在一个组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测任意用户是否是机器上的管理员?我有用户的域和用户名,但没有密码.用户不是当前登录的用户,所以我不能只使用 WindowsIdentity.GetCurrent.

How do I detect if an arbitrary user is an administrator on a machine? I have the user's domain and username but not password. The user is NOT the currently logged in user, so I can't just use WindowsIdentity.GetCurrent.

推荐答案

使用 LDAP.在此处查看示例.

Use LDAP. See examples here.

这篇关于检测用户是否在一个组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆