Page created: 22 Jul 2020 |
Page updated: 12 Dec 2022
Use the ldapmodify command from the command line. Specify
the modification using the
changetype:modifydirective, and then specify which attributes are to be added using the add directive. In this example, we add another value for the
cnattribute, which is multi-valued. When you are done typing, you can press CTRL-D (UNIX EOF escape sequence) twice to process the request.
$ bin/ldapmodify -h server.example.com -p 389 -D "cn=admin,dc=example,dc=com" \ -w password dn: uid=user.2004,ou=People,dc=example,dc=com changetype: modify add: cn cn: Sally Tea TreeAn error could occur if the attribute is single-valued, if the value already exists, if the value does not meet the proper syntax, or if the value does not meet the entry’s objectclass requirements. Also, make sure there are no trailing spaces after the attribute value.