Modifying an attribute from the command line
Steps
-
To locate a specific entry, run the
ldapsearchtool.Example:
$ bin/ldapsearch -h server.example.com -p 389 -D "cn=admin,dc=example,dc=com" \ -w password -b dc=example,dc=com "(uid=user.2004)" -
To change attributes from the command line, run the
ldapmodifycommand.-
Specify the modification using the
changetype:modifydirective and then specify which attributes are to be changed using thereplacedirective.Example:
In this example, we change the telephone number of a specific user entry.
$ 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 replace: telephoneNumber telephoneNumber: +1 097 453 8232
-
-
Process the request:
Choose from:
-
For Unix EOF escape sequence, enter
ctrl+dtwice. -
For Windows, enter
ctrl+z.
-