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

Setting a variable where "" need to be in line

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
After readin an article in Windows .net magazine (Easy Active Directory Scripting for Systems Administrators) i created a html form and posted it's reponses to an asp page to create users. I am having a problem setting 1 variable and making it work.

Dim strUser
Dim oUser
Dim strCuser
Dim strContainer
strUser = "Judy Schneider"
strContainer = "LDAP://cn=users,dc=test,dc=com"
Set strCuser = GetObject(strContainer)
Set oUser = strCuser.Create("user","cn=""&struser&""")
oUser.Put "sAMAccountName", strUser
oUser.SetInfo
The next line is my problem.
Set oUser = strCuser.Create("user","cn=""&struser&""")
How do I write this.
Any help would be greatly appreciated.
Thanks in advance!!
 
How about...
Code:
Set oUser = strCuser.Create("User","CN=" & strUser)

I would think that a problem would also occur assigning a common name to the samAccountName, and that you would need to modify the name to a login name (ie: JSchneider)

~ jmcallister
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top