M
Mike C
Hi,
I am trying to create a user object in an ADAM directory using ADSI.
It fails at the .SetInfo call, with error code 80072032, "An invalid dn
syntax has been specified".
I can't for the life of me see what can be wrong with the DN syntax.
The ADAM directory is running on Windows 2003 Server, Enterprise Edition
configured as a Primary Domain Controller, with Active Directory. The code
below fails when binding as a Windows principal or ADAM principal.
I did wonder if permissions or user rights may be an issue, but the Windows
Administrator should have sufficient permissions.
Any thoughts would be appreciated.
Mike
Dim openDS As ActiveDs.IADsOpenDSObject
Dim usr As ActiveDs.IADsUser
Dim dso
Dim userName As String
Dim password As String
'--bind using Windows principal
userName = "Administrator"
password = "password"
openDS = GetObject("LDAP:")
dso = openDS.OpenDSObject( _
"LDAP://localhost:50000/OU=Dev,O=BJ,C=US", _
userName, _
password, _
ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
'--create a new user
usr = dso.Create("user", "CN=jdoe")
usr.Put("cn", "John")
usr.Put("sn", "Doe")
usr.SetInfo() '<<-- fails here with 80072032,
"invalid dn syntax"
I am trying to create a user object in an ADAM directory using ADSI.
It fails at the .SetInfo call, with error code 80072032, "An invalid dn
syntax has been specified".
I can't for the life of me see what can be wrong with the DN syntax.
The ADAM directory is running on Windows 2003 Server, Enterprise Edition
configured as a Primary Domain Controller, with Active Directory. The code
below fails when binding as a Windows principal or ADAM principal.
I did wonder if permissions or user rights may be an issue, but the Windows
Administrator should have sufficient permissions.
Any thoughts would be appreciated.
Mike
Dim openDS As ActiveDs.IADsOpenDSObject
Dim usr As ActiveDs.IADsUser
Dim dso
Dim userName As String
Dim password As String
'--bind using Windows principal
userName = "Administrator"
password = "password"
openDS = GetObject("LDAP:")
dso = openDS.OpenDSObject( _
"LDAP://localhost:50000/OU=Dev,O=BJ,C=US", _
userName, _
password, _
ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
'--create a new user
usr = dso.Create("user", "CN=jdoe")
usr.Put("cn", "John")
usr.Put("sn", "Doe")
usr.SetInfo() '<<-- fails here with 80072032,
"invalid dn syntax"