Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create user with password ADSI using ASP

Status
Not open for further replies.

jepe666

Programmer
Apr 17, 2008
36
ID
i have trouble to create user with password using asp..
here's my code :

<%@ Language=VBScript %>
<html>
<head>
</head>
<body>
<%
Set oDomain = GetObject("GC://pdcserver/ou=usersaccounts,dc=mycorp,dc=intranet")

Set oUser = oDomain.Create ("user","cn=testing")
oUser.Put "sAMAccountName", "testing"
oUser.Put "givenName", "Testing"
oUser.Put "sn", "Testing"
oUser.Put "displayName", "Testing"
oUser.Put "Description", "want to testing"
oUser.SetInfo


oUser.SetPassword "justtest"
oUser.Put "PasswordExpired", CLng(1)
oUser.AccountDisabled = false

set oDomain=nothing
set oUser =nothing
%>
</body>
</html>


i have error like :
error '80072035'
/test/user.asp, line 19
can u help me ??? give me the solve....
thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top