Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hello everybody,
Obviously, the samba configuration file survive a reboot. So, this let me think that it must be stored somewhere in the flash, but the question is: where exactly?
I checked out /dev/mtdblock{0,1}, but the only file I could find that bears some similarities was smb.default...
Basically, I'd like to be able to restore my smb.conf after that a disk has failed. Indeed, plugging a new disk will cause the smb.conf to be reset.
TIA,
Loic.
Offline
Good evening,
so after browsing the forum, it's seems that the standard solution to alter the smb.conf is:
1) to store the wanted smb.conf somewhere on the disk.
2) use fun-plug to copy the smb.conf from the disk to RAM disk at /etc/samba and restart the samba server.
... Something along those lines. Did I got it right?
Thanks,
Loic.
Offline
Yes, that is what I do and it is working nicely. Here is the script I use,
I store my "improved" smb.conf in /mnt/HD_a2/conf directory (which I created)
#!/bin/sh # stop samba /usr/bin/smb stop # backup default smb.conf cp /etc/samba/smb.conf /mnt/HD_a2/conf/backup/smb.conf # copy new config file cp /mnt/HD_a2/conf/smb.conf /etc/samba/smb.conf # restart samba /usr/bin/smb start
I call the script smbd-restart.sh and put it in the /mnt/HD_a2/fun_plug.d/start
directory with the execution permissions set.
# chmod 755 /mnt/HD_a2/fun_plug.d/start/smdb-restart.sh
I'm running Fonz's v0.3 fun_plug scripts http://www.inreto.de/dns323/
Last edited by mig (2007-11-24 10:06:48)
Offline
Hello,
I'm running fun-plug 0.5 and I would like use your script to copy smb file
I create a file smdb-restart.sh and complete it with your code
I copy smdb-restart.sh to the folder ffp\start
and after I think I forget to set one thing because script doesn't work after reboot.
Can you help me?
Offline
Auto answer! It work now because in first time I forget:
# chmod 755 /mnt/HD_a2/ffp/start/smdb-restart.sh
Offline
I have tried to copy manually smd.conf to /etc/samba but when I type LS the file is not there!
Offline
"Obviously, the samba configuration file survive a reboot. So, this let me think that it must be stored somewhere in the flash, but the question is: where exactly?"
I've been googling around trying to find an answer to this exact question. I know we can do all sorts of config restoration, but curiosity is eating me...
What I figured was that the smb.default file gets copied to smb.conf and then shares are injected into it upon reboot... But where are they defined? It's got to be somewhere! Fingers crossed some of you DNS hackers know the answer ;-)
EDIT: Ah, one more thread and found The Answer - it's the /mnt/HD_a4/.systemfile/.smb.ses file that stores the shares, with 3 backups of it scattered on HD_a4 and HD_b4. Right, time to get on with life.
Last edited by davidcie (2009-11-19 15:40:30)
Offline