user creation using ldapmodify

Hi Jay and ALL,

I have Sun Java msging 2005Q4 running on solaris 10 successfully. I am able to create users using commadmin and also with Directory Server console. They are absolutely working fine.

I would like to know how to create users using ldapmodify. As this is related to Directory Server, i have already submitted this in DS forum but no one could help.

The below is the command i used to create:

./ldapmodify -a -h example.com -p 389 -D "cn=Directory Manager" -w <password>

dn: cn=test t1001,ou=People,o=example.com,dc=example,dc=com

changetype: modify

add: uid

uid: test1001

givenName: test1001

sn: t1001

userPassword: test@1000

TIA

Regards,

Praveen RK

[760 byte] By [sun_prvnrk] at [2007-11-26 10:02:27]
# 1

If this is an entirely new entry, you have to use changetype:add and then give the whole entry with a blank line after it. Also, you have to specify all the required attributes. To be useful you need to specify at least cn (it doesn't create a cn attribute just because you use cn in the DN), mail, and some object classes. What I'd do is look at a user that you created with commadmin and that works, and create new users just like that. You need several objectclasses before the mail system will recognize the user as a person.

clhedrick at 2007-7-7 1:34:48 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

Thank clhedrick for your reply.

I did try with a sample of exported ldif fprmat as well but of o use.

I used "-a" option to ldapmodify by thinking it would create cn.

I'd be glad if you could provide me an example of ldapmodify command with all the attributes to create a new uid. Once uid is created, we could add any mail attribute to it.

Regards,

sun_prvnrk at 2007-7-7 1:34:48 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...