1

I'm using a script that is supposed to add an attribute to an LDAP record. It used to work, then we moved the LDAP server from Solaris Unix to Linux.

Now the script doesn't work and throws an error

The LDIF file looks like this :

 dn:cn=template-uid,ou=Groups,o=mycompany.com,o=Company
 changetype:modify
 mgrpRFC822MailMember:new@gmail.com

ldapmodify gets called like this :

ldapmodify -h ldap.mycompany.com -D "cn=LDAPuser" -w *pswd* -v -p 636 -f updateUser.ldif

This is the error that gets thrown :

  ldapmodify: Invalid parameter "mgrpRFC822MailMember" specified for changetype modify 

If I log into LDAP using an LDAP browser with the same user, I can manually add the attribute without any problem. I just can't do it from command line.

Any ideas ?

Thanks

jeph perro
  • 6,242
  • 26
  • 90
  • 124

1 Answers1

1

Assuming it should add a value to mgrpRFC822MailMember, it should be:

 dn: cn=template-uid,ou=Groups,o=mycompany.com,o=Company
 changetype: modify
 add: mgrpRFC822MailMember
 mgrpRFC822MailMember: new@gmail.com

A changetype of modify needs an action defined, which would be one of: add, delete, replace. That is then followed by the attribute name to take the action on. I'm surprised it worked at all in the previous form.

ChadSikorra
  • 2,829
  • 2
  • 21
  • 27