Re: Persmission Denied



Im afraid thats not it! Have not enabled anonymous access (using
integrated).

Have done some testing - have succesfully been able to run a wscript
through asp (see below), disabling a user account in AD, however this
has only been possible running the asp page directly on my test IIS
(IIS 6.0 w2k3 member srv).
When I try to run from a client (standard XP) I get "HTTP 500 -
Internal Server Error". Think Im still being denied access?

>Jakob Outzen wrote:
>> Need to be able to perform user administration on Active Directory
>> objects using a web interface. Have made a .vbs script which is
>> working when executed directly on DC, however when embedding it in an
>> asp application (vb script), I keep getting persmission denied.
>> Running asp on an IIS 6.0 member server in a w2k3 environment.
>> Have read that this problem has to do with that its the IIS
>> application being validated when trying to access the AD!
>>
>> Is it possible to supply the proper credentials via the script, or
>> can I grant the IIS application on the member server the proper
>> permission in AD (its an intranet server with trusted users) .
>> Any help much appreciated!

>is your IIS virtual dir set up to use anonymous access? if so, you may
>want to set it to use integrated windows auth or some other auth for
>that site.

<%
Dim strStatus, strDomain, strBrugerOU, strBrugernavn, strFornavn,
strTestUser, strAfd_Elever
Dim strAfdeling, strAdgangskode, strEfternavn, strKlasse, objTrans,
strUserDN, objUser
Dim strStandardKode, strGruppeOU

Const ADS_PROPERTY_UPDATE = 2
Const ADS_UF_ACCOUNTDISABLE = 2
Const ADS_PROPERTY_APPEND = 3
Const ADS_NAME_INITTYPE_GC = 3
Const ADS_NAME_TYPE_NT4 = 3
Const ADS_NAME_TYPE_1779 = 1

strStatus = "OK"
strDomain = "dc=domain,dc=dk"
strBrugerOU = "ou=Elever"
strGruppeOU = "cn=Elever,ou=Users"

strBrugernavn = "testuser"

If (strStatus = "OK") Then

strUserShort = strBrugernavn
strBrugernavn = "RKRNET\" + strBrugernavn
strUserExist = False

' Use the NameTranslate object to convert the NT user name to the
' Distinguished Name required for the LDAP provider.
Set objTrans = CreateObject("NameTranslate")

' Initialize NameTranslate by locating the Global Catalog.
objTrans.Init ADS_NAME_INITTYPE_GC, ""
' Use the Set method to specify the NT format of the object name.
objTrans.Set ADS_NAME_TYPE_NT4, strBrugernavn

' Use the Get method to retrieve the RPC 1779 Distinguished Name.
strUserDN = objTrans.Get(ADS_NAME_TYPE_1779)
%>
var js_bnavn = '<%=strUserDN%>';
<%
If Err Then AdsiErr()
' Bind to the user object in Active Directory with the LDAP provider.
Set objUser = GetObject("LDAP://"; & strUserDN)

'If (objUser) Then
'strUserExist = True
'End If
objUser.Put "userAccountControl", 514

intUAC = objUser.Get("userAccountControl")

objUser.Put "userAccountControl", intUAC OR
ADS_UF_ACCOUNTDISABLE
objUser.SetInfo

Set objUser = Nothing

Else

%>
var js_confirm = '<%=strUserExist%> User was not founrd!';
<%

End If

Sub AdsiErr()
'******** not used ********'
WScript.Quit(1)

End Sub
%>
regards
Jakob Outzen
jo@xxxxxxxxxxxxxxxxx (remove "cutitout" to reply)
.



Relevant Pages

  • Re: wsx to asp ad rotator doesnt work
    ... has anonymous access enabled, and does not have any other ... The pub point wsx file has a test file that is called ... The second entry in the wsx file is the asp page. ... >control is enabled on the IIS box? ...
    (microsoft.public.windowsmedia.server)
  • CreateObject("CDONTS.NewMail") fails
    ... We have an ASP page running on IIS 5.0 running on Win2K Server with Exchange ... under anonymous access. ...
    (microsoft.public.inetserver.iis.security)
  • Re: dllhost
    ... It's just about 100% pure ASP with com objects. ... DLLHOST goes to 95-100% utilization and stays there indefinitely unless IIS ... > a simple HTML page serve or do they also hung? ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... CGIs, and ASP scripts onto a 64bit machine, and it just works after they ... The most confusing aspect of running 32bit app on a 64bit OS is that you ... System32 access is redirected, etc). ... we will be introducing the ability to configure IIS to run ...
    (microsoft.public.inetserver.iis)
  • Re: ASP Authentication on IIS 6.0 Windows 2003 Server 32bit help please
    ... when an ASP page is executed in IIS? ... site that requires a user to enter their domain account to access the ... the ASP script code ... I find that the .exe runs ...
    (microsoft.public.inetserver.iis.security)