NT Local Groups: Determiming from NT ID


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: NT Local Groups: Determiming from NT ID

Hybrid View

  1. #1
    OM Guest

    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

  2. #2
    Michael Howard Guest

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center