psa (2)

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 AS domain_name, AS database_name, db_users.login, accounts.password FROM data_bases, db_users, domains, accounts WHERE data_bases.dom_id = AND db_users.db_id = AND db_users.account_id = […]

get protected directory user and password

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