[Date Prev][Date Next] [Chronological] [Thread] [Top]

add entries on openLDAP using ADSI



I can modify attributes of existing openLDAP (unix) accounts with no problem
using ADSI and asp.  Now I need to create accounts on the openLDAP. 

Set oContainer = oLDAP.OpenDSObject("LDAP://semail";,
"cn=____,dc=semo,dc=edu", "_____", 0)
if Err.Number<>0 then
 Response.write "Open container failed."
else
    After opening container, I try to add user entries, but everything I've
tried fails.
 Set oUser = oContainer.Create("User","cn=user2")
 oUser.Put "dn", "cn=user2,dc=semo,dc=edu"
 oUser.Put "objectClass", "inetOrgPerson"
 oUser.Put "objectClass", "inetLocalMailRecipient"
 oUser.Put "sn", "user2"
 oUser.SetInfo

***As stated... modifying an existing user is no problem:
Set oUser = oLDAP.OpenDSObject("LDAP://semail/CN=user1,DC=semo,DC=edu";,
"cn=____,dc=semo,dc=edu", "_____", 0)
oUser.mailRoutingAddress="modified@semo.edu"
oUser.SetInfo

Thanks,
Dan