overflow tmp folder on aws

When you receive an error message like

scp: writing /tmp/mkinitramfs_Y2BgCE/ [..] : No space left on device

check how big your tmp folder is. If it looks like

overflow        1.0M  1.0M     0 100% /tmp

your volume was probably full at a time. After you allocated new disk space umount your volume with

umount /tmp

If you receive the error “umount: /tmp: device is busy.” run “lsof /tmp/” to see what is using it.

After umounting /tmp your system should work fine again. You can prevent /tmp from reappearing after a restart with

echo 'MINTMPKB=0' > /etc/default/mountoverflowtmp


How to run a VMware image in Virtualbox

Having just downloaded Kali Linux I was wondering how to convert its VMware image to VirtualBox, thankfully I quickly found a page that just recommended to create a new virtual machine and add the VMware image as a disk: http://opendirective.net/blog/2014/07/on-converting-a-vm-from-vmware-to-virtualbox/

So if you want to run Kali Linux in Virtualbox, just

a) Create a new virtual machine in VirtualBox
b) Slect ‘Use an existing virtual hard drive file’ and select the Kali-Linux image (e.g. Kali-Linux-1.1.0-vm-amd64, the one without -s00x in the name)

By they way, the default login for Kali Linux is root / toor


Clean up binlog files

If you care having disk space issues because your MySQL bin logs are too big you can delete older ones using this simple MySQL query:


This example will keep 21 days of binlogs, set the interval as needed. Btw, if you are using MySQL replication, this command will not be replicated (good!).


USB stick read only

If you cannot write on your USB stick on Debian please check if you have entries like this in your /etc/fstab file.

/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sdb2       /media/usb1     auto    rw,user,noauto  0       0

If you do, please comment them out, restart your computer and try to mount your USB stick again.


pyhton 2 complaining about PKCS12 format

If gam (the Google Apps Manager) on Debian shows an error like

NotImplementedError: PKCS12 format is not supported by the PyCrpto library. Try converting to a “PEM” (openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem) or using PyOpenSSL if native code is an option.

you are probably missing the python openssl package. Install it with

sudo apt-get install python-openssl

For Python 3 you will need python3-openssl instead.

connect to cisco vpn in debian

The default Debian setup only shows options to connect to OpenVPN and to Import from file. To connect to a Cisco VPN first install these packages:

vpnc network-manager-vpnc  network-manager-vpnc-gnome

After a restart of Network Manager (/etc/init.d/network-manager restart) you will have an additional option, Cisco Compatible VPN (vpnc).