[wellylug] Accessing OpenOffice files across a Samba network

Grant McLean grant at mclean.net.nz
Fri Aug 17 20:21:42 NZST 2007


On Fri, 2007-08-17 at 12:14 +1200, Colin & Josephine Lewis wrote:
> On Fri, 2007-08-17 at 11:07 +1200, Donovan Jones wrote:
> > try 'sudo aptitude install smbfs' and then try mount it again
> > 
> > Donovan
> Thanks for that suggestion Donovan.  Installed smbfs and rerun the mount
> command and it now works perfectly.  
> 
> My next question is, do I need to place this laptop mountpoint anywhere
> else to ensure the filesystem link will automatically establish itself
> anytime I switch my machine off?

You can put an entry in /etc/fstab, but that means that your system will
attempt to mount the network share every time you boot.  This might
cause things to hang if the other system happened to be unavailable.

I've configured the automounter in a very similar configuration to the
one you described.  When my system boots, no network filesystems are
mounted.  If I attempt to browse into a directory of open a file on the
network share, the automounter transparently intercepts things and sets
up the required network mount with no user intervention.  If I stop
browsing or close a file, after some delay the shared drive will be
unmounted.


First install the 'autofs' package.

Then in the file /etc/auto.master, make sure there's a line for
auto.misc that is not commented out.  Mine looks like this:

/var/autofs/misc /etc/auto.misc --timeout=60

That means that everything under /var/autofs/misc is controlled by the
automounter configuration in the file /etc/auto.misc.

I have a number of entries in /etc/auto.misc here's one example:

mydocs  -fstype=smbfs,username=guest,password=  ://DESKTOP/My_Documents

This line means that if I try to access anything
under /var/autofs/misc/mydocs, the automounter will mount the share
called 'My_Documents' from the machine called 'DESKTOP'.  (I probably
exported it with the underscore so I wouldn't have to worry about
quotes).

After changing any of the automounter config files you need to reload
the daemon:

  sudo /etc/init.d/autofs reload

In my case I also set up some more convenient symlinks under /net so I
could refer to /net/mydocs rather than /var/autofs/misc/mydocs:

sudo mkdir /net
sudo ln -s /var/autofs/misc/mydocs /net/mydocs

Cheers
Grant




More information about the wellylug mailing list