you have to reboot, choose "safe mode". You get into a text-mode menu. Choose "open root session" (or similar. I can't remember exactly). From there you can modify the files. You must use a terminal-based editor like vi, nano or emacs. I suggest to use nano, it's the simplest one. When done, type "exit" at the prompt to get back to the menu.
To mangwills:
you have to reboot, choose "safe mode". You get into a text-mode menu. Choose "open root session" (or similar. I can't remember exactly). From there you can modify the files. You must use a terminal-based editor like vi, nano or emacs. I suggest to use nano, it's the simplest one. When done, type "exit" at the prompt to get back to the menu.