Oh, ouch. Do you get something like a boot menu when you turn it on? If so, you could boot into what's called single user mode, which gives you a completely barebones boot (no graphical stuff at all) where you are the root user and you can edit the necessary files. Typical scenario for when you lose your root password or something like that.
i've stumbled upon the tutorial for using single user mode, maybe i'll give it a try
