Tag Archives: DirectAdmin

Check for MySQL databases without existing DirectAdmin users

# Check MySQL databases without existing DA users. # Be careful, check twice before removing a DB. for dbuser in ` \ find /var/lib/mysql \ -mindepth 1 \ -maxdepth 1 \ -type d \ -exec basename ‘{}’ \; \ | cut -d’_’ -f1 \ | sort -u \ | grep -vE “^(da|lost\+found|mysql|performance)\$”`; \ do \ Read the full article…

Filtering/sanitizing IP addresses lists on command line

Sometimes You have to obtain via command line on a list of IP addresses and you need to be sure it will not contain any IP addresses assigned to the machine You’re working on – especially, when You’re planning to use this list during automated modification of firewall rules.