Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Error 1063 using dsObjCreate

Keywords: 	 error 1063 dsobjcreate

Question:

I'm trying to create a new user account in win2k AD. user will reside in a custom OU structure. my ADSIPATH looks like:
sAdsiPath = "LDAP://cn=ou3,ou=ou2,ou=ou1,dc=mydom,dc=com"
sObjectClass = "user"
sUserName = strcat("cn=",firstname," ",lastname)
sObjectPath = dsCreateObj( sAdsipath, sObjectClass, sUserName)
I have created a user in the default USERS folder but we want to organize our users and workstations by locationa and functional area

Some additional info....

If I simplify the sadsipath:

sadsipath = "LDAP://CN=users,DC=mydom,DC=com"
It works fine. I can add the user.

I still need help adding the user to a different OU Any ideas??

Answer:

Make sure you only refer to an organizational unit with the syntax "ou=". You can not access an ou by using "cn=". Also, you have multiple ou's in our path, this would only work if you have nested ou's.

Resolution:

I got it working.
  1. OUs should be listed from lowest level to highest level in sAdsiPath

  2. OU names are case sensitive

  3. users is not the same Users
When I fixed that, it started working. Thanx for your help
Article ID:   W15039