We?re running IIS 4.0 on a Windows NT BDC for our intranet. The script below works when an admin is logged into the server, and runs the script locally first. It will then work on any computer in the domain. However, once the admin logs off the local server, no computer can successfully run the script (the error is also posted below). I?m assuming this is a permissions issue. What permissions must we set on the IIS server, so the script can be run, without compromising security.
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
set adsUser = GetObject("WinNT://" & strUsername)
*** The above line fails, which is referenced in the error message below ***
for each group in adsUser.groups
GrpList = GrpList & lcase(trim(group.name)) & ";"
if instr(1,GrpList,"domain admin") then session("permission") = "YES"
The error message (when an admin is logged into another computer and tries to access the page).
The network path was not found.
/Report/global.asa, line 11
The error message (when a domain user is logged into another computer and tries to access the page).
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
/Report/global.asa, line 6