while loop (true)

Need to execute a set of commands in a loop, non-stop?

while true; do killall -9 program; sleep 3; done

This will tell your Linux O/S do killall -9, sleep for 3 seconds, and start it again. This is great if you don’t have access to a crontab or just need it for a quick fix.

named-checkzone

Do you need to check the zone file syntax via command line after making a change. You can run the following:

named-checkzone domain.com /var/named/domain.com.db

Results should be similar to

zone domain.com/IN: loaded serial 20190xxxxx
OK

Linux Kernel Tuning

Do you need help tweaking your Linux operating system for the best performance? Just contact me and I’ll be more than happy to assist you.

Tuning involves I/O scheduler tuning, ACPI power management, networking performance tuning, and even web-site tuning *WordPress/Joomla!*.

Contact me

KVM *dump xml*

If you ever need to gain VNC access to a KVM virtual server and you are not sure what ip, port, or even password is needed to access VNC to a KVM VM, enter this from command line:

virsh dumpxml <kvm> –security-info

Replace <kvm> with the name of your virtual machine. You can get the names by running:

virsh list

Quickly (Un)Suspend Email in Cpanel

If you need to quickly suspend e-mail for an e-mail address in cPanel and do not want to do this via the GUI, issue the following from command line as root:

whmapi1 suspend_outgoing_email user=$cpuser

Of course you’ll want to replace $cpuser with the username of the cpanel account you’d like to suspend e-mail for. The same thing goes for un-suspending:

whmapi1 suspend_outgoing_email user=$cpuser

WHM (root) passwordless

If you ever need to login to WHM/cPanel and do not have the root password, there is a call to the API you can make from command line to temporarily give you access. Just issue the following from the command line as root:

whmapi1 create_user_session user=root service=whostmgrd locale=en

exim eXploit – cPanel

After some extensive reading and working through an older version of EXIM mail daemon which is commonly used in cPanel, it would appear there is a nasty bug in an older version of EXIM.

READ MORE ABOUT THE EXIM eXploit

You will need to patch any older versions NOW or simply upgrade. There is a worm going around eXploiting the EXIM versions. If you have any issues or need help, I am here to assist. https://tickets.linuxgu.com/open.php – Submit a ticket and I get e-mailed directly.