Plesk (9)


Get MySQL Passwords from Plesk (bash/command line)

Quick bash script to grep out MySQL passwords from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; echo "Searching MySQL user tables for: $1"; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘SELECT domains.name AS domain_name, data_bases.name AS database_name, db_users.login, accounts.password FROM data_bases, db_users, domains, accounts WHERE data_bases.dom_id = domains.id AND db_users.db_id = data_bases.id AND db_users.account_id = […]

Read more...



Get Protected Directory Logins from Plesk

Quick bash script to grep out protected directory logins from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; you=`who am i | cut -d’ ‘ -f1`; echo -e "Hello $you, looking in the protected dirs password list for \033[33;1m$1\033[0m eh?"; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘select pd.login, a.password, d.name, dirs.path from accounts a, pd_users […]

Read more...



Get FTP Passwords from Plesk

Quick bash script to grep out ftp passwords from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; echo "Searching the FTP password list for: $1"; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘SELECT REPLACE(sys_users.home,"/home/httpd/vhosts/","") AS domain, sys_users.login,accounts.password FROM sys_users LEFT JOIN accounts on sys_users.account_id=accounts.id ORDER BY sys_users.home ASC’ | grep $1;[/code] Usage: [code gutter=”false”][root@mail bin]# grepftp […]

Read more...



get protected directory user and password

one query to grab the user and pass from the Plesk psa database: SELECT pd.login, a.password, d.name, dirs.path FROM accounts a, pd_users pd, protected_dirs dirs, domains d WHERE dirs.path = ‘admin’ AND a.id = pd.account_id AND pd.pd_id = dirs.id AND dirs.dom_id = d.id AND d.id = DOMAIN_ID;

Read more...



dr. web updater email notification

sick of them yet!? here’s how to get rid of those updates you get every single hour, every single day. [code]nano /etc/drweb/drweb32.ini[/code] Find the line that contains “CronSummary” (without the quotes of course :)) Ctrl + W in nano will open a “Find”, just type your text and press enter… Simply change [code]CronSummary Yes[/code] to […]

Read more...



Plesk / Spamd Permission Error

Looking at /var/log/messages, I noticed the following: [code]Feb 10 10:58:26 mail spam_hook[12873]: unable to open configuration file /etc/psa/psa.conf: Permission denied Feb 10 10:58:26 mail spam_hook[12857]: unable to open configuration file /etc/psa/psa.conf: Permission denied[/code] This is a bug introduced in one of the Plesk 9.2.* hotfixes / patches. The problem was causing spam to not be […]

Read more...



change email password

how to change a user’s email password from the command line. much quicker that waiting for the (sometimes) slow-ass Plesk web interface to reload itself for such a simple change. [code]/usr/local/psa/bin/mail -u username@domain.com -passwd ‘NeWPassWorD!’;[/code]

Read more...



Tail logs in Plesk

To view the FTP transfer log: [code]tail -f /usr/local/psa/var/log/xferlog[/code] To view the mail log: [code]tail -f /usr/local/psa/var/log/maillog[/code]

Read more...



creating subdomains in plesk 10

it seems Plesk 10 has a few issues with creating subdomains. Considering we’re on Plesk 10 now, i find it shocking. so, via the command line, let us create a new subdomain for an existing domain on the box: the first argument needed is to pass to the –create option, the [SUBDOMAIN] placeholder is where […]

Read more...