Resetting LDAP and MySQL Passwords

Resetting LDAP and MySQL passwords

   KB 2444        Last updated on 2023-01-26  




0.00
(0 votes)

Various Zimbra services use passwords stored in localconfig when connecting to ldap and mysql. If these passwords are incorrect, or if you just want to change them, this guide explains how to update the passwords.

Updating LDAP Passwords

It is necessary to run the password update commands as the zimbra user.

# su - zimbra

In ZCS 5.0.x / ZCS 10.0

 Command Usage: /opt/zimbra/bin/zmldappasswd [-h] [-r] [-p] [-l] newpassword
	-h: display this help message
	-a: change ldap_amavis_password
	-l: change ldap_replication_password
	-n: change ldap_nginx_password
	-p: change ldap_postfix_password
	-r: change ldap_root_passwd
	Only one of a, l, n, p, or r may be specified
	Without options zimbra_ldap_password is changed

Make sure that slapd is running. Note that the actual process id (pid) will vary.

$ ldap status
slapd running pid: 32266

Update the ldap root password.

$ zmldappasswd -r newrootpass

Update the zimbra ldap password.

$ zmldappasswd newpass

If necessary, update the password for other ldap users (amavis, replication, nginx, postfix).

In ZCS 4.5.x

Stop zimbra services.

# su - zimbra
$ zmcontrol stop

Verify that all Zimbra services are stopped.

$ ps auxww | grep zimbra

Now we can reset the passwords. Note: In versions of ZCS up to 4.5.x the zimbra ldap password must be the same as the ldap root password.

Update the ldap root password.

$ zmldappasswd --root newpass

Update the zimbra ldap password.

$ zmldappasswd newpass

Updating Mailbox MySQL Database Passwords

For Zimbra 9 and above see page linked below.

New feature in 7.x /opt/zimbra/libexec/zmresetmysqlpassword (a life saver). 

It is necessary to run the password update commands as the zimbra user.

# su - zimbra

Make sure the mailbox mysql database is running. Note that the actual process id (pid) will vary.

 $ mysql.server status
 mysql is running with pid 23830

If that fails to find a running mysql, verify that the mailbox mysqld does not appear in the process list, and then start it.

$ ps a | grep mysqld.*my.cnf
$ mysql.server start
 

Update the mysql root password.

$ zmmypasswd --root newrootpass

Update the zimbra mysql password.

$ zmmypasswd newpass

Updating Logger MySQL Database Passwords

It is necessary to run the password update commands as the zimbra user.

# su - zimbra

Make sure the logger mysql database is running. Note that the actual process id (pid) will vary.

 $ logmysql.server status
 mysql is running with pid 23830

If that fails to find a running mysql, verify that the mailbox mysqld does not appear in the process list, and then start it.

$ ps a | grep mysqld.*my.logger.cnf
$ logmysql.server start

Update the logger mysql root password.

$ zmmylogpasswd --root newrootpass

Update the logger zimbra mysql password.

$ zmmylogpasswd newpass

Related Articles

Verified Against: unknown Date Created: 3/28/2006
Article ID: https://wiki.zimbra.com/index.php?title=Resetting_LDAP_and_MySQL_Passwords Date Modified: 2023-01-26



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »



Keywords: ldap, logger, mysql, database, password

Jump to: navigation, search