- Run the ldapmodify tool from the command line interface.
-
Specify the modification using the
changetype:modify
subcommand. -
Specify which attributes to add using the add option.
In this example, we add another value for the
cn
attribute, which is multi-valued.$ 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 Tree
-
To process the request, enter ctrl+d twice.
This is the UNIX EOF escape sequence.
Note:An error might 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.Remove any trailing spaces after the attribute value.