- September 10, 2012
Linux, MySQL, ...
#ftp, #MySQL, #Plesk
Quick bash script to grep out ftp passwords from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; echo &quot;Searching the FTP password list for: $1&quot;; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘SELECT REPLACE(sys_users.home,&quot;/home/httpd/vhosts/&quot;,&quot;&quot;) 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 […]
- September 10, 2012
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;
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 […]
Looking at /var/log/messages, I noticed the following: [code]Feb 10 10:58:26 mail spam_hook: unable to open configuration file /etc/psa/psa.conf: Permission denied Feb 10 10:58:26 mail spam_hook: 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 […]
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 email@example.com -passwd ‘NeWPassWorD!’;[/code]
- July 11, 2011
#ftplog, #logs, #maillog, ...
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]
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 […]