A few comments:
No need to enable root! Doing so takes way too much time, is unnecessary, and creates an unnecessary security risk.
Instead, simply change the permissions on the file and enclosing directory so you can edit it, and change them back when youre done. (It is not necessary...