In one simple sentence: use a Live CD.
Proceed as follows
- get a live CD (Fedora, Ubuntu, TTYlinux, DSL, pick your pick...)
- burn the CD
- start the system with that CD
- log in (if need be)
- issue an Fdisk -l to find the hard drive
- mount the hard drive
- navigate to the system's network settings file
- open it with the editor provided in the Live CD
- edit & save
Did quite a few rescues this way, believe me, this approach works.