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

Adding a new user to existing LDAP group

We already have a created LDAP Database with multiple groups and users.Now I want to add  a new user and assign him to existing group

I have created a newuser.ldif  file as follows

dn: uid=test,ou=people,dc=crmsldap,dc=agilent
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn:  test
sn:  test
uid: test
userPassword: test
uidNumber: 10000
gidNumber: 300
homeDirectory: /home/test

dn: cn=admin,ou=groups,dc=crmsldap,dc=agilent
changetype: modify
memberUid: test

When I run the script

/opt/symas/bin/ldapmodify -x -D "cn=Manager,dc=crmsldap,dc=agilent" -W -f newuser.ldif
it gives an error as follows

ldapmodify: modify operation type is missing at line 21, entry "cn=admin,ou=groups,dc=crmsldap,dc=agilent"