How to add a new user to Ubuntu

I find adding a new user in Ubuntu really confusing. Surely there should be a wizard program for it? Anyhow, for my records here is how I do it. Create the user Set the users password Then I log in as the user Change the shell to /bin/bash You can make the user a sudoer … Read more

How to convert VirtualBox vdi to KVM qcow2

It is very easy to convert a VirtualBox .vdi disk images to KVM qcow2 file. You have to use the RAW file format as an intermediate. 1 – Make sure the VirtualBox machine is shutdown. 2 – Convert the vdi to a raw disk images. Note: vdi are compressed and raw images are not and … Read more

How to mount a qcow2 disk image on Ubuntu

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running. Step 1 – Enable NBD on the Host You will need to enable the nbd (network block device) kernel module on the host. This … Read more

How to ssh key with a passphrase but not have to enter it all the time.

Everyone knows that passwords aren’t always secure, annoying to remember and type. Add to that the longer/stronger your password the harder it is to remember. Therefore ssh-keys are very convenient and more secure. However, most people don’t put a passphrase on their ssh-keys because surely this would mean you would have to enter this passphrase … Read more

Ansible error fatal: must be stored as a dictionary/hash

I’ve been trying to setup group_vars in Ansible. My /group_vars/all file looked like; When I ran my playbook it said: It would have been helpful if it had provided a better error message. Anyhow, basically, I had got the syntax wrong in group vars by putting “quotes” around the value: Hope this helps someone.

How to install Ansible on Ubuntu

The Ansible website has some instructions for installing it on Ubuntu here. However, I like to install things from repositories and not git. So, I found a PPA with the latest version of Ansible on Launchpad. https://launchpad.net/~rquillo/+archive/ansible So to install Ansible on Ubuntu run: Thanks Rodney Quillo.