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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADSI user creation error

Status
Not open for further replies.

phbrady

Programmer
Oct 17, 2003
41
US
I'm using ASP to create a user in Active Directory and I'm getting the following error:

Active Directory error '80070005'
General access denied error

The error occurs on the "SetInfo" method call.
I have full rights to the Active Directory database and can manually set up a user.

Following is my code:

<%
' *** TEST USING LDAP ***
Set oContext = GetObject(&quot;LDAP://DC=mycompany,DC=com&quot;)
Set oUser = oContext.Create(&quot;user&quot;,&quot;CN=user temp&quot;)
oUser.Put &quot;samAccountName&quot;, sUser
oUser.Put &quot;givenName&quot;, &quot;User Temp&quot;
oUser.SetInfo

oUser.SetPassword &quot;test&quot;
oUser.SetInfo
%>

Thanks in advance!
 
You might wanna give admin privileges to IUSR_yourwebserver to write and execute on AD server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top