copy mysql user password ? (sqlu_pass) - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: copy mysql user password ? (sqlu_pass) (/thread-9529.html) |
copy mysql user password ? (sqlu_pass) - Eminos - 02-07-2010 12:54 AM Hi, I recreated/copied some databases and recreated their users on a new ispcp server. I would now like to copy the passwords from the sql_user table, but it doesn't seem to work. If I change the password in the control panel (ispCP) it works (of course), but I would like to copy the passwords in phpmyadmin from the old sql_user to the new one on the new server. If I set THE SAME password via ispCP control panel, it doesn't generate the same output in the sql_user table on the old and the new server. Could someone explain? Why doesn't this seem to work? Thanks in advance.. /E Oh yes, and the old ispCP is 1.0.0 and the new one is 1.0.3-1. Has the sqlu_pass crypt hash changed ? RE: copy mysql user password ? (sqlu_pass) - kilburn - 02-07-2010 04:09 AM (02-07-2010 12:54 AM)Eminos Wrote: Oh yes, and the old ispCP is 1.0.0 and the new one is 1.0.3-1. No, what's different is the encryption key used by your servers. These keys are generated during the installation, so to export passwords from one server to another you have to either: - Decrypt the passwords first (using the key from "server1") and re-encrypt them afterwards (using the key from "server2") - Use the same encryption keys on both servers. Extra hint: the encryption keys are stored in the following three files: Code: /var/www/ispcp/engine/messager/ispcp-db-keys.pl RE: copy mysql user password ? (sqlu_pass) - Eminos - 02-07-2010 04:13 AM Great answer. Thanks. Because I have already created some new sites the complete use of the old encryption keys is not possible (I would break the new passwords). How can I de-crypt with old encryption keys and re-encrypt with new ones? I have access to both the old and the new ispCP server. Thanks in advance. /E RE: copy mysql user password ? (sqlu_pass) - kilburn - 02-07-2010 04:23 AM You can do it with the following functions (php): Code: function decrypt_db_password ($db_pass, $ispcp_db_pass_key, $ispcp_db_pass_iv) { |