• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Change Database passoword PSA depends on

N

NormanS

Guest
Alright, here is the deal, we where having some security issues, so we hat to change the name of our database.... so now psa wont display anymore, because it has to wrong password stored in the (I assume) "/usr/local/psa/bin/init_conf" file. I was suggested to use this command:

# /usr/local/psa/bin/init_conf --update -passwd newpasswd

like: # /usr/local/psa/bin/init_conf --update -passwd Xlyl (for example)

Now I am having the problem, that the command does not work and i can't change anything in the psa files because thei are in the PSA inviromental language. (I asume the problem can be solved quiet easily)

Any suggestions?

Norman

ps here is the error msg:

ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.

0: common_func.php3:108
psaerror(string 'Unable to connect to database: saved admin password is incorrect.')
1: auth.php3:93
 
Nooo

Please not :p

This doesn't work, we have tried this several times

Always 1040 Error
 
Try this:

1. Stop MySQL server.

/etc/init.d/mysqld stop

2. Open up your MySQL configuration file. This file is called my.cnf and is in /etc directory.

3. Add this line into the [mysqld] section:

skip_grant_tables=1

4. Start MySQL server.
/etc/init.d/mysqld start

5. Login to MySQL as admin user

mysql -u admin

6. Run this query :

update mysql.user set password=password('current_password') where user='admin'

Where current_password is the string from this file /etc/psa/.psa.shadow

7. Exit the MySQL console.

8. Stop MySQL sever.

9. Remove the line from /etc/my.cnf

10. Start MySQL.
 
Igor

Just wondering, when using cat /etc/psa/.psa.shadow
is this information we see encrypted?
as i cant just copy it from the file to the command you based above??
can i??
 
For new installations, the file .psa.shadow no longer contains the administrator's password in the plain-text format. Instead, this file contains an encrypted hash of the password. This improves the security level and prevents attempts to gain the administrative access to Panel by stealing the password. If you upgrade Panel from earlier versions, the password remains in plain text. To learn how to encrypt the administrator's password after the upgrade, see http://kb.odin.com/en/111192.

The new way of storing the administrator's password does not anyhow affect typical commands that used the password. For example, you are free to run "mysql –uadmin –p`cat /etc/psa/.psa.shadow` psa". In case you wish to obtain the plain-text password, use the "/usr/local/psa/bin/admin --show-password" call.
 
For new installations, the file .psa.shadow no longer contains the administrator's password in the plain-text format. Instead, this file contains an encrypted hash of the password. This improves the security level and prevents attempts to gain the administrative access to Panel by stealing the password. If you upgrade Panel from earlier versions, the password remains in plain text. To learn how to encrypt the administrator's password after the upgrade, see http://kb.odin.com/en/111192.

The new way of storing the administrator's password does not anyhow affect typical commands that used the password. For example, you are free to run "mysql –uadmin –p`cat /etc/psa/.psa.shadow` psa". In case you wish to obtain the plain-text password, use the "/usr/local/psa/bin/admin --show-password" call.
i get a response of
# /usr/local/psa/bin/admin --show-password
Unable to connect to database: 1045
when using /usr/local/psa/bin/admin --show-password
 
Looks like password from /etc/psa/.psa.shadow and for mysql admin user are not identical.
 
Looks like password from /etc/psa/.psa.shadow and for mysql admin user are not identical.

lol pleeeasssee tell me you know how i can fix this lol
i did try changing the admin p/w for mysql...
but how do i change it back :S
 
I do not understand what is the problem to use provided above instruction and possibility to encrypt/decrypt password described in KB article?
 
followed instructions, its now working
except if i want to encrypt the password i then get an error in phpmyadmin about setup script and no config??
 
Last edited by a moderator:
I just ran into this problem and wanted to post a clarification because I just spent two hours banging my head, wondering why it didn't work.

The key here is that the admin password in MySQL needs to be set to the encrypted password from the .psa.shadow file, not your actual Plesk admin password. If you copy the exact text from psa.shadow, it will work.

I hope this saves someone some frustration. In looking at the instructions again, it does in fact say to do this, but the idea of using an encrypted password from the panel as an actual password for the database was so unintuitive to me that I didn't recognize what they were telling me. :-/
 
Back
Top