[thelist] [Theforum] extract NT security (groups) through .asp / javascript

Caravan, James C REV:EX James.Caravan at gems4.gov.bc.ca
Thu Aug 1 11:03:12 CDT 2002


I am specifically looking for extracting NT permission groups and found this
bit of code.

in Global.asa:

Sub Session_OnStart
'**Put your code here **
on error resume next

     strUsername=Replace(ucase(Request.ServerVariables("LOGON_USER")) ,
"\",
"/")
     set adsUser = getobject("WinNT://" & strUsername)
     for each group in adsUser.groups
          GrpList = GrpList & lcase(trim(group.name)) & ";"
          session("GroupList") = session("GroupList") &
lcase(trim(group.name)) & ";"
     next

     if instr(1, GrpList ,"SecureNTGroupName") then session("permission")
=
"OK"
End sub
-----------------------
In code.asp:

<%
     response.write "Group List " & session("GroupList")
     if session("permission") <> "OK" then Response.Redirect
"loginfailure.asp"
%>

---------------------------
Unfortunately there is nothing being written out for GroupList so I can
see
the NT security groups being extracted.

Do you have any thought? maybe code that should work?

Thanks

 > James Caravan
 > Programmer/Analyst
 > RevISB
 > Ministry of Provincial Revenue
 > 2nd Floor, 1802 Douglas Street
 > Victoria, British Columbia V8T 4K6
 >
 > phone	250 356-1568
 > fax	250 356-0361
 >
 > MailTo:James.Caravan at gems4.gov.bc.ca


 > James Caravan
 > Programmer/Analyst
 > RevISB
 > Ministry of Provincial Revenue
 > 2nd Floor, 1802 Douglas Street
 > Victoria, British Columbia V8T 4K6
 >
 > phone	250 356-1568
 > fax	250 356-0361
 >
 > MailTo:James.Caravan at gems4.gov.bc.ca
 >
 >
---
evolt.org wiki: http://freezope2.nipltd.net/acorn/evolt/
-
How can you help?
http://freezope2.nipltd.net/acorn/evolt/FactFindingMission




More information about the thelist mailing list