[Samba] Linux to Windows Dfs

Urban Widmark urban at teststation.com
Tue May 21 15:57:02 GMT 2002


On 21 May 2002, Chris Tooley wrote:

> > You can't currently mount a directory below the share level. It wouldn't
> > be that hard to support it but it's never been requested before.
> 
> I have wished for this for a long time.  The ability to mount some
> directory down the tree without making a ton of shares would be great.

Apparently tonight is request night. Ok here you go:

Patch for samba:
http://www.hojdpunkten.ac.se/054/samba/samba-2.2-submount.patch
Use patch -p0 from the source dir.

Patch for the linux kernel:
http://www.hojdpunkten.ac.se/054/samba/smbfs-2.4.18-submount.patch
Use patch -p1 from the linux dir, the tree does not have to be 2.4.18
(2.4.17 or 2.4.19-preX are ok too).

You need to patch both and rebuild.

If you are actually using 2.4.18 you should also apply this:
http://www.hojdpunkten.ac.se/054/samba/00-smbfs-2.4.18-codepage.patch.gz


Only tested lightly vs localhost samba. But I can now do:

mount -t smbfs //localhost/tmp/somewhere/level1 /mnt/smb

And /mnt/smb will present the contents of somewhere/level1. If you test
this I'd like to know how it works. I don't think this does anything
useful for the dfs user and that problem is a little bit harder.

If you are using fstab you may see some new failures because of this. But
that just means that you are using fstab incorrectly ... :)


Btw, if someone wants to clean up the code that parses the service string
search for "quick hack" and then send me the better version of that. I'm
sure there is someone out there that gets a kick from doing string parsing
in C ...

/Urban





More information about the samba mailing list