This question already has an answer here:
I have made a small script and placed it in a file inside /etc/profile.d directory. Since then, I can not login in ubuntu 12.04, nor in terminal as the normal user. I can only login as root from recovery mode.
When I login as root, I try to delete the file but reaction is
can not remove file x... read only file system.
I also try to change it in root with nano (put comments everywhere), but I can not save it. Is there any way to delete it?