If you are getting the grub screen then you can
go to runlevel 1
and change the file.
On grub screen you will have to
press a after selecting the Fedora kernel with which you want to boot.
APPEND single after space in that line and press enter
press b to boot in single user mode
You can edit any file in this mode.