[Samba] samba and automount

Christopher Barry cbarry at infiniconsys.com
Sat Nov 16 21:13:01 GMT 2002


On Sat, 2002-11-16 at 15:49, Tim Allen wrote:
> On 16 Nov 2002, Christopher Barry wrote:
> 
> > On Sat, 2002-11-16 at 13:49, Trey Nolen wrote:
> > >
> > > > You have 2 options as I see it:
> > > > 1. EASY: don't map the share!
> > >
> > > That would work (has worked for some) but this software REQUIRES a mapped
> > > drive. :-(
> > >
> > >
> > > > 2. HARDER: Compile samba --with-msdfs, drive-map the *root* of the msdfs
> > > > tree, and make the cd-rom share a 'hidden share' folder under the root.
> > > > The name of the msdfs symlink will appear as the share name to your
> > > > users. That way, even though the drive is mapped to the root,
> > > > pre/post-exec will still work when someone actually clicks on the folder
> > > > under the root.
> > > >
> > > > Read up on msdfs use in samba. It's not easy at first, but once you
> > > > learn it, you'll wonder how you ever got along without it.
> 
> When you say hidden share, do you mean as in share$? What is the
> significance of making it hidden?
> 
> Cheers
> 
> Tim Allen
> 

It's not essential, it just avoids confusion from the user perspective.
When they browse the server - as opposed to using the mapped drive, they
would see the msdfs root, and the share at the same level under the
server. Then when they opened the madfs root share, there would be a
folder that pointed back to the share that was directly under the
server. like so:

[server]
     |_<msdfsroot>
     |      |_<msdfs-link pointing to cdrom share>
     |_<cdrom share>

If you just make all of the shares that are accessed by an msdfs root on
the same box hidden, in this case <cdrom share> it's just a lot cleaner.
Now browsing the server looks like so:

[server]
     |_<msdfsroot>
            |_<msdfs-link pointing to cdrom share$>


Obviously, if <cdrom share> lived on a box different from that which
hosted the root, this would not be necessary, unless you only wanted
people to access that data through the root - and you might - so you
could log it in one place for instance. 

msdfs is a great way to abstrct the location of the data so you can move
stuff around behind the scenes, to take advantage of a new server for
instance, and your users do not have to change a thing. Also, you can
organize multiple shares from multiple servers under a *single* drive
mapping - VERY cool.

Christopher







More information about the samba mailing list