Tag Archives: Plesk

Plesk: mysql admin password

Since Version 10 it’s possible that the password of the mysql database of Plesk is, well they call it encrypted. This is basically fine, but may can run you in some trouble. For example if you like to install you own global phpMyAdmin installation and then try to log in as admin.

You’ll first try will be to use the same password as you will use when log in to Plesk. That will not work! Then you’ll may step over the ssh shell and type in

cat /etc/psa/.psa.shadow

This will give you something like

$AES-128-CBC$X...==

Yeah … that looks like the password is encrypted. As Plesk admin you know an other way to get the password

/usr/local/psa/bin/admin --show-password

This will output the password you already tried. Then you’ll dig around the internet and may find this cmd

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

And … it’s working! You get access to mysql. Hmm … now you’re may a bit confuse. But thing about it. If you want to access your mysql database outside of Plesk you have to use the whole output of

cat /etc/psa/.psa.shadow

as password! Even if it look like it’s encrypted. This is your database password!

 
If you don’t like to have such a super long password and can live with a plain text password in the file /etc/psa/.psa.shadow you can change it back. But remember to repeat this every time you change the password via the Plesk panel 🙂

/usr/local/psa/bin/init_conf -u -passwd 'some_password' -plain-password

 
Alternative you can add an other user with full admin rights to your database.

Plesk: Get password of an email account

As server admin you are sometimes in the need to know the password of an email address. Plesk is making this very easy. Just run this command and you’ll get a list of all mail accounts of your server. Also the plain text password of the accounts are shown 🙂


/usr/local/psa/admin/sbin/mail_auth_view

 
Of course of have to adjust the path to your Plesk installation.

Plesk and „qq trouble in home directory“

After upgrading Plesk from an old, but working, 8.6.0 to a recent version everything worked fine afterwards. Then I did the „mistake“ and enabled the build-in greylisting feature. Out of sudden I wasn’t able to send a mail anymore. I got a „qq trouble in home directory“ error message.

Hmm … Bad!. Ok. First I checked the permissions of the qmail installation. All fine. So I searched around. A lot of people out there are having the same problem. It’s the greylisting feature! Plesk qmail thinks we are an extern sender and routes even local domains through the greylist. Bump!

So you may think: „A lot of people are having the same problem, so there is a quick solution!“. Nope – There isn’t! It take some a lot of hours to find a solution by myself. At all it’s easy – if you know how 🙂

So what to do? Since Plesk Version 9.0 you can choose your MTA between qmail and postfix. However the postfix implementation is causing more problems then the qmail one. So I still use qmail. Via the autoinstaller script of Plesk you can easily switch between these two MTAs. And that’s was the solution of my qmail „qq trouble in home directory“ problem.
Start the autoinstaller /usr/local/psa/admin/bin/autoinstaller. On the component list choose Postfix mailserver and continue. The script will uninstall the qmail mailserver and install the postfix mailserver. All current mails will keep in place. So don’t worry (however a backup is always and every time a good idea :-)). The completion of the script takes several minutes. After that do the same thing but select Qmail mailserver. For me it worked fine and the „qq trouble in home directory“ error was gone.

Quick ToDo:

  • Start /usr/local/psa/admin/bin/autoinstaller
  • Select Postfix mailserver as mailserver
  • Finish the installation
  • Start /usr/local/psa/admin/bin/autoinstaller
  • Select Qmail mailserver as mailserver
  • Finish the installation
  • Done

Plesk Migration Manager and Mailman

When you are moving to a new Plesk Server the Migration Manager of Plesk is a cool feature. It helps you to keep out of a lot of trouble. But unfortunately it also add some trouble.
When you try to migrate a Mailman maillinglist the Migration Manager first adds a new list with default settings and then add user per user to list. But there is on heavy pitfall: The defaults say to send a welcome message to every new user. *bumm*!
So every user will get again (or the first time :-)) the welcome message of the list. In general this isn’t a good idea.

To avoid this problem we need to change the defaults of the Mailman settings. We need to add a line to the file mm_cfg.py Usually you’ll find the file at /usr/lib/mailman/Mailman. Edit the file and add

DEFAULT_SEND_WELCOME_MSG = No

If you like you can take a look at the file Defauls.py in the same directory. There you’ll find all other defaults. If you want to override one of these settings you just need to add an other line to the mm_cfg.py file.