PDA

View Full Version : How to Edit .conf files then have them saved.



-=NTL=-
06-25-2003, 09:22 PM
i need to change soem things in my .conf files so that i can add a samba user but there is no way to save the changes. Do i just have to open them, edit them, then just leave them open or is there some way to get this taken care of.

adamm
06-25-2003, 10:28 PM
I use vi when i edit files on knoppix
do ctrl+alt+f2 so that you are in a shell as root, or "K" > Knoppix > root shell
then

vi /path/to/file.conf

then edit the file by going to the spot you want to edit and hit "i" to begin inserting text (you may need a quick refresher on vi first)
when you want to save to a read only file do this
yes you need the colon
hit escape first then

:wq!
the ! on the end of write and quit should override the read-only on the file