Discussion:
Adding a new user to existing LDAP group
Subbarao Karanam
2009-09-02 10:17:03 UTC
Permalink
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"

Thanks
Subbarao
Dieter Kluenter
2009-09-03 07:14:45 UTC
Permalink
Hi,
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
[...]
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"
Your ldif file is badly designed, man ldapmodfiy(5) has some good
examples.

-Dieter
--
Dieter Klünter | Systemberatung
http://dkluenter.de
GPG Key ID:8EF7B6C6
53°37'09,95"N
10°08'02,42"E
Jan-Piet Mens
2009-09-03 07:02:31 UTC
Permalink
Post by Subbarao Karanam
dn: cn=admin,ou=groups,dc=crmsldap,dc=agilent
changetype: modify
memberUid: test
ldapmodify: modify operation type is missing at line 21, entry "cn=admin,ou=
groups,dc=crmsldap,dc=agilent"
Reread ldapmodify(1). You are missing `replace: memberUid' or `add: ...'
between line 2 and 3.

-JP

Loading...