PDA

Bekijk de volledige versie : edit smb.conf manually ?



martin700
11-12-2004, 21:23
I am using JockyW Custom firmware 1.1.2.8 and tried to fine tune my samba configuration.
I made my modifications to ...conf/usr/local/samba/lib/smb.conf, but after every reboot this file is reset to some default values which i set by the web interface i first used.
How can i make permanent changes to smb.conf ?

Thank you :confused:

JOCKYW2001
12-12-2004, 19:07
Yes, smb.conf is written at boottime. You can cheat by renaming nmbd and smbd to nmbd.orig and smbd.orig and then create shellscripts named nmbd and smbd which start nmbd.orig and smbd.orig using your own smb.conf (nmbd -s path/to/your/smb.conf -D, same for smbd)

JockyW

PS: If you can give recommendations for smb.conf please post them here

alpha5
13-12-2004, 07:21
flashfs enable
echo "/etc/smb.conf" > /usr/local/.files


edit your /etc/smb.conf



flashfs save
flashfs commit

JOCKYW2001
13-12-2004, 08:36
flashfs enable
echo "/etc/smb.conf" > /usr/local/.files


edit your /etc/smb.conf



flashfs save
flashfs commit
This does unfortunately not work in WL-HDD 1.1.2.8 firmware

martin700
13-12-2004, 17:43
Yes, smb.conf is written at boottime. You can cheat by renaming nmbd and smbd to nmbd.orig and smbd.orig and then create shellscripts named nmbd and smbd which start nmbd.orig and smbd.orig using your own smb.conf (nmbd -s path/to/your/smb.conf -D, same for smbd)

JockyW

This did not work for me. If i make a ps -A the sh daemon is loaded after smbd. so i think that script processing is working after loading of smbd.

But you hinted me in the right direction. I moved my smb.conf to a different directory and changed the default path to it in your smbd and nmbd binary with a hex-editor.
Sorry for that hack - but it was my last resort.

Concerning my smb.conf file, I needed user level security, as different users had their e-mail folders on the WL-HDD.
With the web-interface i got no write access to any directory when i unchecked guest - writable. the line :

write list = USERX

had no effect as long as the line:

valid users = USERX

was missing. This line was only infrequently created by the web script.
I also experianced the strange effect, that the global setting of

security = USER

was changed back to share after some reboots.

So now with my smb.conf at a different location, I hope my configuration will remain stable.

Cheers

Martin