In ubuntu 10.04: sudo nano /etc/gdm/custom.conf
In Ubuntu 11.10, this has changed to ยจsudo nano /etc/lightdm/lightdm.conf” – sandy(d)

Enabling automatic Login after suspend
Type gconf-editor in a terminal (Alt+Ctrl+T to call the terminal).
Go to apps/gnome-power-manager/locks
Check “use_screensaver_settings”.
If still asked for password, you can (also in gconf-editor) go to
desktop/gnome/lockdown and check: “disable_lock_screen“