easiest way would be to use the gedit text editor that comes with GNOME
Enter your root password:
Make changes, close the file and exit out of root account.
The fact that you are able to view the file but not change it is because of file permissions. Only root can make changes to system critical files.