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

how to create account or user with active directory in asp??

Status
Not open for further replies.

jepe666

Programmer
Apr 17, 2008
36
ID
how to create account or user with active directory in asp??
with domain: dc=starcosmos,dc=intranet


Thanx very much,
jepe
 
You would need to study up on LDAP.

It's not hard..... but you have to have permissions to AD to do it.

Here's something to get you started:

Code:
Set con = Server.CreateObject("ADODB.Connection")
con.provider = "ADsDSOObject"
con.open "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = con

Com.CommandText = "select givenName from 'LDAP://SERVERNAME/ou=Users,ou=Site,DC=domain,DC=com' WHERE sAMAccountName='" & theUser & "' ORDER BY sn; "



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
You might also check the VBScript forum: forum329

There are some network admin types over there that do a lot of neato AD stuff... you can easily convert their examples for use in ASP.
 
thanks for helping gbaughma...

Now i can connect,but now i have trouble to create user with password in LDAP using asp..

thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top