Help - Search - Members - Calendar
Full Version: Samba rewriting samba.conf
MandrivaUsers.org > Advanced Topics > Other Linux and Unix Distributions
Scythe
I've got my server running Samba to share files with my other computers. The only problem is that Samba takes it unto itself to rewrite samba.conf and put some semi-colons where they don't belong. For example:

CODE
[Music]
    path = /media/storage1/Music
;    writeable = no
;    browseable = yes
    valid users = owner, Music
    write list = owner

In front of the writeable and browseable tags. This means that I have to continually keep going back in to edit that back to the way I had it. Quite annoying.

Does anyone know a way to keep this from happening? I tried to make the file read-only, but that didn't work (probably because root is the owner).


[moved from Software by spinynorman]
daniewicz
Try launching konqueror as root and then change the permissions from within konqueror with a right-click.

kdesu konqueror
Scythe
I did that when I set the permissions in the first place :-/
daniewicz
If the file is owned by root and is marked as read-only then how can it be written to??

I am confused. unsure.gif
ianw1974
If you are root, you can write to anything. No file is read-only to root. Or at least should definitely not be. This is in fact looking in the wrong place. If samba is modifying it, then you need to look at what is modifying it. If you are using swat, then check here, and ensure every setting you are choosing is correct.

If you are using a Mandriva wizard for reconfiguring samba, then this is probably why. The only way to stop samba from modifying the file as you go along is edit the file in standard text mode without any gui tools doing it for you. If you have these installed, then remove them.
Scythe
I'm actually doing this is Fedora 7, which has its own Samba configuring GUI (I forget what it's called). I'll try uninstalling it and see what happens.

*edit* The Fedora tool is system-config-samba
scarecrow
Since the smb.conf is a VERY complicated configuration file, it is one of the few I'm using a gui to touch...
I do not like kde's samba module, so I use webmin, whose module is idiot-proof and working great.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.