Resetting LDAP and MySQL Passwords

From Zimbra :: Wiki

Jump to: navigation, search
Admin Article

Article Information

This article applies to the following ZCS versions.
  ZCS 5.0 Article  ZCS 5.0
  ZCS 4.5 Article  ZCS 4.5

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.

Contents

Updating LDAP Passwords

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

# su - zimbra

In ZCS 5.0.x

 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

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: http://wiki.zimbra.com/index.php?title=Resetting_LDAP_and_MySQL_Passwords Date Modified: 05/17/2011


Keywords: ldap, logger, mysql, database, password

Personal tools