使用活动目录权限执行c#代码 [英] Execute c# code with active directory permissions
问题描述
嘿所有人
我正在处理代码,如果一个nic获得apipa ip,代码将禁用/启用nic以重启dot1x方法。
i am working on code that if a nic get apipa ip , code will disable/enable nic to restart dot1x method.
因为你知道AD中的普通用户不允许禁用/启用nic。
as u know ordinary users in AD aren't allowed to disable/enable nic.
并且使用apipa ip client无法连接到AD以获取AD的票证管理员
and with apipa ip client can not connect to AD to get ticket of AD Administrator
所以当我安装我的代码时,我正在寻找一种方法,以获得适当的权限或系统权限来访问 禁用/启用nic。
so i m looking for a method when i am installing my code that get suitable permissions or system permission to get access to disable/enable nic.
祝福
推荐答案
我会使用组策略并允许用户执行此操作。
I would use Group Policy and enable the users to perform this operation.
尝试在管理员帐户下运行应用程序是个坏主意。也就是说,除非您想将管理员凭据存储在计算机上。
Trying to run the app under an admin account would be a bad idea. That is, unless you want to store the admin credentials on the machine.
这篇关于使用活动目录权限执行c#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!