Active Directory对象的GetAccessControl? [英] GetAccessControl for Active Directory Objects?
本文介绍了Active Directory对象的GetAccessControl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
System.Security.AccessControl.FileSecurity(GetAccessControl)工作正常。
现在我想对Active Directory对象使用GetAccessControl
电脑。我已经搜索了很多,但我找不到任何解决方案。
任何人都可以通过示例或链接来解决我的问题吗?
非常感谢提前!!!
Hallo!
System.Security.AccessControl.FileSecurity (GetAccessControl) works fine.
Now I would like to use GetAccessControl for Active Directory Objects like
computers. I''ve searched a lot but I''ve found no solution.
Can anyone help me with an example or with a link to solve my problem?
Thanks a lot in advance!!!
推荐答案
试用WMI
chanmm
" KarlM" < Ma ****** @ newsgroup.nospamwrote in message
新闻:D9 ************************ ********** @ microsof t.com ...
Try WMI
chanmm
"KarlM" <Ma******@newsgroup.nospamwrote in message
news:D9**********************************@microsof t.com...
你好!
System.Security.AccessControl。 FileSecurity(GetAccessControl)工作正常。
现在我想将GetAccessControl用于Active Directory对象,例如
计算机。我已经搜索了很多,但我找不到任何解决方案。
任何人都可以通过示例或链接来解决我的问题吗?
非常感谢!
Hallo!
System.Security.AccessControl.FileSecurity (GetAccessControl) works fine.
Now I would like to use GetAccessControl for Active Directory Objects like
computers. I''ve searched a lot but I''ve found no solution.
Can anyone help me with an example or with a link to solve my problem?
Thanks a lot in advance!!!
不,你不应该走这条路,FCL的V2有你需要的所有东西来获得AD
对象安全编程正确。
Willy。
" chanmm" < ch ***** @ hotmail.comwrote in message
news:%2 **************** @ TK2MSFTNGP05.phx.gbl .. 。
|试试WMI
|
| chanmm
|
| " KarlM" < Ma ****** @ newsgroup.nospamwrote in message
|新闻:D9 ********************************** @ microsof t.com ...
|你好!
| System.Security.AccessControl.FileSecurity(GetAccessControl)工作
罚款。
| >
|现在我想将GetAccessControl用于Active Directory对象
就像
|电脑。我搜索了很多,但我找不到解决方案。
|任何人都可以帮我一个例子或一个链接来解决我的问题吗?
| >
|非常感谢提前!!!
|
|
No, you shouldn''t go that road, V2 of the FCL has all you need to get AD
object security programming correct.
Willy.
"chanmm" <ch*****@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
| Try WMI
|
| chanmm
|
| "KarlM" <Ma******@newsgroup.nospamwrote in message
| news:D9**********************************@microsof t.com...
| Hallo!
| System.Security.AccessControl.FileSecurity (GetAccessControl) works
fine.
| >
| Now I would like to use GetAccessControl for Active Directory Objects
like
| computers. I''ve searched a lot but I''ve found no solution.
| Can anyone help me with an example or with a link to solve my problem?
| >
| Thanks a lot in advance!!!
|
|
" ; KarlM" < Ma ****** @ newsgroup.nospamwrote in message
新闻:D9 ************************ ********** @ microsof t.com ...
|你好!
| System.Security.AccessControl.FileSecurity(GetAccessControl)工作正常。
|
|现在我想将GetAccessControl用于Active Directory对象,例如
|电脑。我搜索了很多,但我找不到解决方案。
|任何人都可以帮我一个例子或一个链接来解决我的问题吗?
|
|非常感谢提前!!!
这样的事情会让你开始。
使用(DirectoryEntry computers = new
DirectoryEntry(" LDAP://xxxxx/cn=computers,DC=...",...))
{
foreach(计算机中的DirectoryEntry计算机。孩子们)
{
Console.WriteLine(computer.Properties [" cn"]。值);
ActiveDirectorySecurity compSecurity = comp.ObjectSecurity;
Console.WriteLine(compSecurity.GetSecurityDescript orSddlForm(AccessControlSections.Access));
}
}
Willy。
"KarlM" <Ma******@newsgroup.nospamwrote in message
news:D9**********************************@microsof t.com...
| Hallo!
| System.Security.AccessControl.FileSecurity (GetAccessControl) works fine.
|
| Now I would like to use GetAccessControl for Active Directory Objects like
| computers. I''ve searched a lot but I''ve found no solution.
| Can anyone help me with an example or with a link to solve my problem?
|
| Thanks a lot in advance!!!
Something like this will get you started.
using(DirectoryEntry computers = new
DirectoryEntry("LDAP://xxxxx/cn=computers,DC=...", ...))
{
foreach(DirectoryEntry computer in computers.Children)
{
Console.WriteLine(computer.Properties["cn"].Value);
ActiveDirectorySecurity compSecurity = comp.ObjectSecurity;
Console.WriteLine(compSecurity.GetSecurityDescript orSddlForm(AccessControlSections.Access));
}
}
Willy.
这篇关于Active Directory对象的GetAccessControl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文