Create new user using IIS/ASP

O

Ohaya

Hi,

I'm running IIS5 on a Win2K server, and I want to have an ASP page that
creates new users. I have some simple code to test this, but am getting
a "500" error when I run it.

The ASP looks like:

<%

strDomain ="Foo.com"
strUser ="Foo1"

' Create new user with password
Set oDomain = GetObject("WinNT://" & strDomain)
Set oUser = oDomain.Create ("User", strUser)
oUser.SetPassword = "password"
oUser.SetInfo
%>

Just for this testing, I've added IUSR_machinename to the Administrators
group, but am still getting the 500 error.

Can anyone tell me what I'm doing wrong here???

Thanks in advance!!
 
O

Ohaya

Ray,

HOORAY!!!! That worked great!!

Thanks a lot!

(Did I include enough exclamation points in this post :)?)

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top