Resetting LDAP and MySQL Passwords: Difference between revisions

(New page: One of the most common problems with installing and starting a service is an incorrect LDAP or MySQL password. == Resetting the LDAP Password == First, we need to make sure that Zimbra i...)
 
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
One of the most common problems with installing and starting a service is an incorrect LDAP or MySQL password.
{{BC|Community Sandbox}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=Resetting LDAP and MySQL passwords=
{{KB|{{Unsupported}}|{{ZCS 10.0}}||{{ZCS 5.0}}||}}
{{WIP}}
Various Zimbra services use passwords stored in [[Zmlocalconfig|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 ==


== Resetting the LDAP Password ==
It is necessary to run the password update commands as the zimbra user.
First, we need to make sure that Zimbra is stopped.
# su - zimbra


Try running:
===In ZCS 5.0.x / ZCS 10.0 ===


  su zimbra
<pre>
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
</pre>


  zmcontrol stop
Make sure that slapd is running. Note that the actual process id (pid) will vary.
$ ldap status
slapd running pid: 32266


Just to be safe, you can make sure that all Zimbra services are stopped:
Update the ldap root password.
$ zmldappasswd -r '''newrootpass'''


  ps auxww | grep zimbra
Update the zimbra ldap password.
$ zmldappasswd '''newpass'''


  ps auxww | grep slapd
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


Kill any left over processes.
Verify that all Zimbra services are stopped.
$ ps auxww | grep zimbra


Now, we can reset the passwords:
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''.


First the root(note: these are run as user zimbra)
Update the ldap root password.
$ zmldappasswd --root '''newpass'''


  zmldappasswd --root &#39;&#39;&#39;newpass&#39;&#39;&#39;
Update the zimbra ldap password.
$ zmldappasswd '''newpass'''


Next the zimbra:
== Updating Mailbox MySQL Database Passwords  ==
For Zimbra 9 and above see page linked below.
<pre>
New feature in 7.x /opt/zimbra/libexec/zmresetmysqlpassword (a life saver).
</pre>
It is necessary to run the password update commands as the zimbra user.
# su - zimbra


  zmldappasswd &#39;&#39;&#39;newpass&#39;&#39;&#39;
Make sure the mailbox mysql database is running. Note that the actual process id (pid) will vary.
 
  $ mysql.server status
Make sure you use the same password for both!
 
 
&#39;&#39;Note: For Zimbra 5.0 and newer, you must start Zimbra with:&#39;&#39;
 
  zmcontrol start
 
And then use the following to change the root user
 
  zmldappasswd -r &#39;&#39;&#39;newpass&#39;&#39;&#39;
 
Next the zimbra:
 
  zmldappasswd &#39;&#39;&#39;newpass&#39;&#39;&#39;
 
== Resetting Mailbox Database Passwords  ==
Make sure mailbox database is running. Run all commands as user &#39;&#39;zimbra&#39;&#39;.
 
This checks for a pid file:
  mysql.server status
   mysql is running with pid 23830
   mysql is running with pid 23830


Also use:
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
$ ps a | grep mysqld.*my.cnf
$ mysql.server start
    
    
Update the mysql root password.
$ zmmypasswd --root newrootpass


&#39;&#39;&#39;root account&#39;&#39;&#39;
Update the zimbra mysql password.
Set &#39;&#39;newpassword&#39;&#39; to your desired password.
$ zmmypasswd newpass


  zmmypasswd --root newpassword
== Updating Logger MySQL Database Passwords  ==
It is necessary to run the password update commands as the zimbra user.
# su - zimbra


&#39;&#39;&#39;zimbra account&#39;&#39;&#39;
Make sure the logger mysql database is running. Note that the actual process id (pid) will vary.
  $ logmysql.server status
  zmmypasswd newpasswd
  mysql is running with pid 23830


== Resetting Logger Database Passwords ==
If that fails to find a running mysql, verify that the mailbox mysqld does not appear in the process list, and then start it.
Make sure mailbox database is running. Run all commands as user &#39;&#39;zimbra&#39;&#39;.
  $ ps a | grep mysqld.*my.logger.cnf
  $ logmysql.server start


  ps a | grep mysqld.*my.logger.cnf
Update the logger mysql root password.
$ zmmylogpasswd --root newrootpass


&#39;&#39;&#39;root account&#39;&#39;&#39;
Update the logger zimbra mysql password.
$ zmmylogpasswd newpass


Set &#39;&#39;newpassword&#39;&#39; to your desired password.
== Related Articles ==
*[[Issues_with_mysql_and_logmysql_passwords|Issues with mysql and logmysql passwords]] may help if the steps in this guide do not work to update the passwords


  zmmylogpasswd --root newpassword
*[http://www.zimbra.com/docs/ne/latest/administration_guide/A_app-command-line.20.1.html CLI Commands ZCS 6.0.x]


&#39;&#39;&#39;zimbra account&#39;&#39;&#39;
*[http://www.zimbra.com/docs/ne/latest/administration_guide/A_app-command-line.18.1.html CLI Commands ZCS 5.0.x]
  zmmylogpasswd newpasswd
 
== Related Articles ==
[[Zimbra_CLI_Command_List|Zimbra CLI Command List]]


----
*[http://www.zimbra.com/docs/ne/4.5.10/administration_guide/A_app-command-line.14.1.html CLI Commands ZCS 4.5.x]
Keywords: &#39;&#39;ldap, logger, database, password&#39;&#39;
*[https://wiki.zimbra.com/wiki/Manually_Reset_MySQL_Password Manually reset MySQL password for ZCS 8.8.15/9]


{{Article_Footer|unknown|3/28/2006}}
{{Article_Footer|unknown|3/28/2006}}


Keywords: ''ldap, logger, mysql, database, password''
[[Category: Database]]
[[Category: LDAP]]
[[Category: LDAP]]
[[Category: Logger]]
[[Category: MySQL]]
[[Category: MySQL]]
[[Category: Pending Certification]]
[[Category: Pending Certification]]
[[Category: Troubleshooting]]
[[Category: Troubleshooting Authentication]]
[[Category: ZCS 5.0]]

Latest revision as of 18:33, 26 January 2023

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