NT Local Groups: Determiming from NT ID
I have a web site that using NT authentication.
From the Server object in ASP I can determine the NT Account.
For this NT Account I wish to determine what local NT Groups this account
belongs to.
Can anyone please tell me if it is possible to determine this using Visual
Basic or ASP code ?
Thanks
OM
Re: NT Local Groups: Determiming from NT ID
you can use ADSI, here's an example from WScript - you'd need to tweak it
to run from ASP, but not by much.
strComputer = "MyServer" ' Use '.' for the local computer.
Set oComp = GetObject("WinNT://" & strComputer & ",computer")
oComp.Filter = Array("group")
For Each group In oComp
WScript.echo group.Name
iCount = 0
For Each member in group.members
WScript.echo " " & member.Name
iCount = iCount + 1
Next
If iCount = 0 Then WScript.echo " <none>"
Next
"OM" <thompsgl@altavista.com> wrote:
>
>I have a web site that using NT authentication.
>From the Server object in ASP I can determine the NT Account.
>For this NT Account I wish to determine what local NT Groups this account
>belongs to.
>Can anyone please tell me if it is possible to determine this using Visual
>Basic or ASP code ?
>
>Thanks
>
>OM