These instructions are for Ubuntu 11.10 Oneiric and onward, and any other version that uses LightDM, as opposed to the previous default of GDM, which I had previously wrote about at here.
First we'll backup the configuration file and then in your editor of choice, probably vi open up /etc/gdm/gdm.conf.
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.baksudo vi /etc/lightdm/lightdm.conf
Next find the line that reads:
In the first line change "false" to "true" and in the second line append the username you want to auto-login after the equals sign. Here is how mine looked:
After a reboot you will find that Ubuntu goes straight to the desktop of the user you defined.
There are other settings you can set in here, such as a time login. Most of these are available from the GUI, but feel free to look around and find any other settings you might want to change.