Need to run cacls from ASP
From: Geir Roger Moen (gemoen_at_broadpark.no)
Date: 03/09/05
- Next message: Jerold Schulman: "Re: Re: LsaAddAccountRights"
- Previous message: Bob Barrows [MVP]: "Re: Classes in VBS?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 09 Mar 2005 13:05:18 +0100
Hi
I'm working on a create user script, and need to give user Full Controll
of his/hers home directory. A Web Application will be doing a
HTTP-request to an ASP, which then will run the create user script. I
have already set myself, an admin user, in the Anonymous Access in the
Directory Security for the web site. I did this cause no script would
run, and interactiv logon is not an option since its a web application
which will be making the request. But cacls wouldn't do anything anyway.
This is how I called cacls:
set obj = Server.createObject ("wScript.shell")
Call obj.Run("cacls " & USER_ROOT_UNC & "\" & un & " /e /g " & un &
":F", HIDE_WINDOW, WAIT_ON_RETURN )
The ASP ran to the end, but when i checked the ACL of the directory, the
user wasn't included, and the cacls command hadn't done a thing. I got a
tip from a friend, and installed dynu.dll and used that exec method.
Then it returned: Access Denied.
rsCmd = "cacls " & USER_ROOT_UNC & "\" & un & " /e /g " & un & ":F"
Set myexec = Server.Createobject("Dynu.Exec")
Response.Write(myexec.execute( rsCmd ))
Is there a way to authenticate an admin user, so I can remove my admin
user from Anonymous Access and/or run the script?
Geir Roger Moen
- Next message: Jerold Schulman: "Re: Re: LsaAddAccountRights"
- Previous message: Bob Barrows [MVP]: "Re: Classes in VBS?"
- Messages sorted by: [ date ] [ thread ]