Backup creates with warning: Could not find password for account

Created:

2016-11-16 12:48:19 UTC

Modified:

2017-04-24 11:24:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Backup creates with warning: Could not find password for account

Applicable to:

  • Plesk

Symptoms

Plesk backups fail with the following error:

Error: domain "example.com"
Could not find password for account id '0'. Return empty password

Cause

  • Database inconsistency in the psa.mail table. account_id has value 0 for several mail accounts.
  • Non-utf8 symbols in mail user password.

Resolution

  1. Log into the psa database

    How to log into the psa database

  2. Find the affected mail accounts using the following MySQL query:

    mysql> SELECT concat(mail.mail_name,'@',domains.name) as email FROM mail INNER JOIN domains ON mail.dom_id=domains.id WHERE mail.account_id=0;
  3. Manually reset the password for each affected mail account:

    For Linux:

    # /usr/local/psa/bin/mail -u sales@domain.com -passwd ********

    For Windows:

    "%plesk_dir%\\bin\\mail.exe" -u sales@domain.com -passwd ********

In addition, the following simple scripts can be used in order to assign the same password for all affected mail accounts:

For Linux :

 MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -Nse'SELECT concat(mail.mail_name,'@',domains.name) FROM mail INNER JOIN domains ON mail.dom_id=domains.id WHERE mail.account_id=0' | while read i; do /usr/local/psa/bin/mail -u $i -passwd 1qazXSW; done

For Windows :

"%plesk_dir%\\mysql\\bin\\mysql.exe" -uadmin -P8306 -p<psa_password> -Nse'SELECT concat(mail.mail_name,'@',domains.name) FROM mail INNER JOIN domains ON mail.dom_id=domains.id WHERE mail.account_id=0' > C:\\affected_emails.txt

cd %plesk_cli%

for /F %a in (C:\\affected_emails.txt) do mail -u %a -passwd 1qazXSW
Have more questions? Submit a request
Please sign in to leave a comment.