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 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 = […]




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;