Use ldappasswd to set or change user passwords in Directory Server.
ldappasswd [
options
] [
user
]
user is the authentication identity, typically a DN. If not specified, the distinguished name specified by the -D option (bind name) is used.
| Option | Description |
|---|---|
-A
|
Specifies that the command should prompt for the user's existing password. |
-a
|
Specifies the user's existing password. For example:
-a
|
-S
|
Specifies that the command should prompt for a new password for the user. |
-s
|
Specifies a new password for the user. For example:
-S
|
-T
|
Specifies a file from which to read the new password. For example:
-T
|
-t
|
Specifies a file from which to read the user's existing password. For example:
-t
|
-w
|
Specifies the password associated with the distinguished name specified in the -D option. For example:
-w
|
The ldappasswd utility requires confidentiality. If the messages are not encrypted with SSL, TLS, or an appropriate SASL mechanism, the server will not perform the request.
| Option | Description |
|---|---|
-3
|
Specifies that hostnames should be checked in SSL certificates. |
-D
|
Specifies the distinguished name with which to authenticate to the server. This value must be a DN recognized by the Directory Server, and it must also have the authority to delete the entries. For example: -D "uid=bjensen, dc=example,dc=com"
The For more information on access control, see the "Managing Access Control" chapter in the Directory Server Administration Guide. |
-g
|
Specifies that the password policy request control not be sent with the bind request. By default, the new LDAP password policy request control is sent with bind requests.
The
The criticality of the request control is set to |
-h
|
Specifies the name of the host on which the server is running. For example:
-h cyclopsThe default is localhost.
|
-I
|
Specifies the SSL key password file that contains the token:password pair. |
-K
|
Specifies the path, including the filename, of the private key database of the client. This can be the absolute or relative (to the server root) path.
The |
-N
|
Specifies the certificate name to use for certificate-based client authentication. For example: -N Server-Cert
If this option is specified, then the
If this option is specified, then the |
-P
|
Specifies the absolute path, including the filename, of the certificate database of the client. This option is used only with the When used on a machine where an SSL-enabled web browser is configured, the path specified on this option can be that of the certificate database for the browser. For example: -P /security/cert.db
The client security files can also be stored on the Directory Server in the -P /etc/dirsrv/slapd-
|
-p
|
Specifies the port number that the server uses. The default is 389. If -Z is used, the default is 636.
|
-Q
|
Specifies the token and certificate name, which is separated by a semicolon (:) for PKCS11. |
-W
|
Specifies the password for the certificate database identified on the -P option. For example:
-W serverpassword |
-w
|
Specifies the password associated with the distinguished name that is specified in the -w diner892
The default is If a password is not sent on the command line and the server requires one, the command prompts for one. It is more secure not to provide a password on the command-line so that it does not show up in clear text in a listing of commands. |
|
|
Specifies that SSL is to be used for the search request. |
|
|
Specifies the Start TLS request. Use this option to make a cleartext connection into a secure one. If the server does not support Start TLS, the command does not need to be aborted; it will continue in cleartext. |
|
|
Enforces the Start TLS request. The server must respond that the request was successful. If the server does not support Start TLS, such as Start TLS is not enabled or the certificate information is incorrect, the command is aborted immediately. |
The following examples provide show how to perform various tasks using the ldappasswd command.
The Directory Manager changes the password of the user uid=tuser1,ou=People,dc=example,dc=com to new_password over SSL.
ldappasswd -Z -h myhost -P /etc/dirsrv/slapd-instance_name/cert8.db -D "cn=Directory Manager"
-w dmpassword -s new_password "uid=tuser1,ou=People,dc=example,dc=com"
The Directory Manager generates the password of the user uid=tuser2,ou=People,dc=example,dc=com over SSL.
ldappasswd -Z -h myhost -P /etc/dirsrv/slapd-instance_name/cert8.db -D "cn=Directory Manager"
-w dmpassword "uid=tuser2,ou=People,dc=example,dc=com"
For more information on newly-generated passwords, see the "Managing the Password Policy" section of the Directory Server Administration Guide.
A user, tuser3, changes the password from old_newpassword to new_password over SSL.
ldappasswd -Z -h myhost -P /etc/dirsrv/slapd-instance_name/cert8.db -D "uid=tuser3,pu=People,dc=example,dc=com"
-w old_password -a old_password -s new_password
A user, tuser4, authenticates with the user certificate and changes the password to new_password over SSL.
ldappasswd -Z -h myhost -P /etc/dirsrv/slapd-instance_name/cert8.db -W dbpassword -N "uid=tuser4" -K /etc/dirsrv/slapd-instance_name/key3.db -s new_password
A user, tuser5, authenticates with DIGEST-MD5 and changes the password to new_password.
ldappasswd -h myhost -o “mech=DIGEST-MD5” -o “authid=dn:uid=tuser5,ou=People,dc=example,dc=com”
-w old_password -s new_password
A user, who has already authenticated by Kerberos, prompts for the new password. This is not performed over SSL.
ldappasswd -h myhost -o "mech=GSSAPI" -S