LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why is smb.conf read only? (https://www.linuxquestions.org/questions/linux-software-2/why-is-smb-conf-read-only-220335/)

spike0 08-20-2004 05:54 PM

Why is smb.conf read only?
 
appologies for the newbie question.

I have a windows 2k machine for the wife and am trying to share a printer connected to my Red Hat v8 machine. I am trying to edit the smb.conf to change the workgroup to 'WORKGROUP', which I hope will make attaching to the printer easier from the Win2k machine.

Unfortunately, smb.conf is read only. I have stopped samba, and checked the permissions but still had no luck. I tried to force the write in vi, but get error e212: Can't open file for writing. Any ideas?

Tinkster 08-20-2004 05:57 PM

Hi, and welcome to LQ!

Editing it as root?


Cheers,
Tink

spike0 08-20-2004 06:22 PM

tinkster,

Thank you. You've hit the nail on the head. When I reopened the file with vi, it told me there was a duplicate swap file, smb.conf.swp. Is it safe to assume I can ignore this? vi suggested that I delete the swap file, but I'm not sure how to get at it.

As a short term fix, I rebooted the computer.

mikshaw 08-20-2004 06:51 PM

By default, vi creates a swp file when you open up a file for editing. If you close vi properly (:q or :wq or :q!), the swp will be removed. If you just close the term window without first closing vi, the swp will not be removed.
It's generally safe to delete the old swp file, since it's just a temp file.


All times are GMT -5. The time now is 08:58 PM.