I had the problem where System - Administration - Login Window
would open for a second then quit. When I ran gdmsetup from the command line I was getting segmentation faults.

I read somewhere that gdm.conf-custom could be damaged or has been replaced.

So replacing gdm.conf-custom got it working for me.

Here's how I done it.

$ cd /etc/gdm

Backup your current gdm.conf-custom (my backup is gdm.conf-custom.org)

$ sudo cp gdm.conf-custom gdm.conf-custom.org

I have a file called gdm.conf-custom.dpkg-old so i thought I'd try it.

$ sudo cp gdm.conf-custom.dpkg-old gdm.conf-custom

Hope this helps someone.