• Contact Us
  • Home
  • Reference

Using ldappasswd

Learn how to securely manage and update user passwords in an LDAP directory using the ldappasswd command.

Written by Maryanne Normann

Updated at March 2nd, 2026

  • Quick Start
  • Installation
    Best Practices Configuration Troubleshooting Design Performance Platform
  • Maintenance
    Releases Upgrade
  • Reference
+ More

Table of Contents

ldappasswd Examples Update User Password Self-serve Password Update

Date: 11-04-2022

The ldappasswd command is used for updating the userPassword on person-type entries. ldappasswd sends a Password Modify control so that the password is hashed before storing and also triggers password policy checks if policies are in place and enforced.

Because ldappasswd forces password hashing, it is safer than simply updating a password using the ldapmodify command.

ldappasswd Examples

These examples use the “ldap:///” URI for the host (localhost, unencrypted). This should be changed to “ldaps://<uri>” to perform these functions to servers over the network.

Update User Password

Update a user's password using simple bind as admin and prompting for the old and new password:

ldappasswd Options Description
-W Prompt for admin's old password
-A Prompt for user's old password
-S Prompt for new password
ldappasswd -xH ldap:/// -D <adminDN> -WAS "<userDN>"

Self-serve Password Update

A user can change their own password using simple bind as themself and prompting for the old and new password:

ldappasswd Options Description
-x Use simple bind (not SASL)
-H Specify the LDAP protocol and server
-W Prompt for admin's old password
-A Prompt for user's old password
-S Prompt for new password
ldappasswd -xH ldap:/// -D "<userDN>" -WAS "<userDN>"

For more information please see the ldappasswd Man Page.

Copyright © 2020-2024 Symas Corporation. All rights reserved.
ldappasswd cli utility

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Chaining Overlay with Keep Alive Function
  • cn=monitor Reference
  • Common ldap Command Parameters
  • Common slapd Command Parameters
  • Convert Single-Master to Multi-Master Replication
  • Symas Blog RSS Feed
  • Symas on Facebook
  • Symas on Twitter
  • Symas Blog
  • Symas on LinkedIn
  • Symas YouTube Channel

Copyright © 2025, Symas Corporation. All rights reserved. Privacy Statement (updated July 31, 2023)

Phone:

Main Office: +1.650.963.7601
Fax: +1.650.390.6284

Email:

Sales: sales@symas.com
Support: support@symas.com

Office Hours:

8:00 AM - 5:00 PM ET

Office Location:

Symas Corporation
PO Box 391
Grand Junction, CO 81507 USA

Expand