Net :: How to modify Samba extension



The weirdness that you are seeing is like mikshaw pointed out. The original /etc/smb.conf was linked to /opt/samba/smb.conf which samba.unc mounted on /opt/samba -- ouch!

Additionally, in order for me to support both legacy and unionfs not all directories participate, i.e., /opt is by default writable and therefore not part of unionfs.

Without testing, I would suggest to rename samba.unc to something else to avoid this.

There are limitations with unionfs and mounting over directories that contain linked files appears to be one.

Unfortunately, newer versions of unionfs do not support 2.4. Not that would necessarliy solve this issue. However, that does not diminish current unionfs usefulness, especailly for lower memory systems.

Since legacy required many links to be created in /opt and unionfs, as I have implemented it, also want to mount in /opt; I will check if these /opt mountpoints exist as links or directories, and if so, not allow this situation to occur. This should then avoid this problem. I will implement in 3.4.1 as well as 4.0

[EDIT] On second thought this test should be in the declobber script and not have pay a penalty to test everytime any unc is loaded.



Just to add more to this topic.

Boot DSL legacy, then mount anything (floppy, pendrive, etc) at /opt/samba.

Where's /opt/samba/smb.conf?

The fact that you can mount over non-empty directories is what is happening here. To expect unionfs to known that everything that became hidden should be copied up is extremely debatable.

I decided to try and compile samba-3 to /opt/samba-3 to get around the various issues that this thread brought up - also I would like my ancient dsl desktop to act as a print server for windows machines and I am not sure the samba extension can do this.

As said earlier, probably the best thing to do would be to rename the samba.dsl extension to something else and then use dsl2unc.

In the meantime, I'll compile samba-3 to use /etc/samba-3/smb.conf in an attempt to avoid all of this...

Some early success - I managed to compile cifs.o for dsl and can mount a windows share using mount.cifs  :)

Quote
To expect unionfs to known that everything that became hidden should be copied up is extremely debatable.
I think this is true for _any_ mount operation.  If you mount a device onto any non-empty directory, regardless of what type of device or what distro you run, the original contents of that directory will be replaced for the duration that the device is mounted on it.

RobertS:

Thanks for clearing that up. I suspected it was all just down to a limitation of the unionfs system.

Juanito:

If you load samba.unc at boot time & then edit smb.conf in /etc/samba using vi (the file is invisible but it edits ok - you need to be root - i.e. use 'sudo vi smb.conf'). Now add this file (etc/samba/smb.conf) to your filetool.lst so that it gets backed up. All will now work automatically on boot as Samba will be loaded first & then the restore script will put the edited smb.conf back where you want it (it still isn't visible under etc/samba, but is editable with vi - it is visible under ramdisk/etc/samba & can be edited there ok as root [run emelfm as root & edit from there]). You can run smbd & nmbd in bootlocal.sh to get the server started. I have used this for file-sharing with M$ clients & it works well.

Next Page...
original here.