Executing of server_pref utility throws warning: mcrypt_cbc()

Created:

2016-11-16 13:16:27 UTC

Modified:

2017-04-24 11:40:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Executing of server_pref utility throws warning: mcrypt_cbc()

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Execution of server_pref utility throws PHP warning:

# plesk bin server_pref --update -hostname `cat /etc/hostname`

SUCCESS: Server preferences are successfully updated

PHP Warning: mcrypt_cbc(): Received initialization vector of size 11, but size 16 is required for this encryption mode; File: /usr/local/psa/admin/plib/Plesk/Base/Utils/String.php, Line: 468

Cause

Plesk database inconsistency: passwords in accounts table are of incorrect length.

Resolution

  1. Back up Plesk database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa  >  /root/psa.dump2.sql
  2. Check accounts table in psa database for passwords of non-standard length, like the following:

    MariaDB [psa]> select * from accounts;
    +------+------+------------------------------+
    | id | type | password |
    +------+------+------------------------------+
    | 2282 | sym | $AES-128-CBC$sdlfsdklfsdjkfs |
    | 2647 | sym | $AES-128-CBC$sdlfsdklfsdjkfs |
    | 3238 | sym | $AES-128-CBC$sdlfsdklfsdjkfs |
    | 3624 | sym | $AES-128-CBC$sdlfsdklfsdjkfs |
    +------+------+------------------------------+
  3. Check sys_users table to find logins of accounts, which passwords were modified on previous step:

    MariaDB [psa]> select login,home from sys_users where account_id=2282;
  4. Update passwords via Home > Domains > example.com > Web Hosting Access for accounts discovered on previous steps.

Have more questions? Submit a request
Please sign in to leave a comment.