Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: create users


Message #1 by "marc cardenas" <marclena@h...> on Fri, 3 May 2002 14:47:02
Does anybody know if I can crete NT users from an ASP page using by 
example windows host scripting or WMI?
Thanks
Message #2 by "phil griffiths" <pgtips@m...> on Fri, 3 May 2002 14:57:00
You can use ADSI to do this.  tho it won't work if its running as 
IUSR_machineName - the user its running as needs to have permission to 
create users.

Here's an example straight from a Wrox book.  They claim it will work on NT

Set objContainer = GetObject("WinNT://Consultant") ' Consultant is the 
domain
Set objUser = objContainer.Create("User", "Doe3811")
objUser.FullName = "John Doe"
objUser.SetInfo
objUser.SetPassword("123456")

Set objGroup = GetObject("WinNT://Consultant/Users")
objGroup.Add("WinNT://Consultant/Doe3811")

HTH
Phil
> Does anybody know if I can crete NT users from an ASP page using by 
e> xample windows host scripting or WMI?
T> hanks

  Return to Index