[Samba] smbmount

Joel Hammer Joel at HammersHome.com
Fri Dec 20 00:32:01 GMT 2002


One way to is put the smbmount commands into your network startup script.

Remember that you don't need to be running nmbd or smbd to run smbmount.

So, in your network script, at the end of the start section, put in the
smbmount commmand.  This will run with root priviledge, so you might
want to read about the uid and gid options of smbmount.

I would also put an umount command in the shutdown part
of the script, so these mounts will be gracefully umounted when the network
goes down.

I use this script to kill all smbmounts when my network goes down:

mount | grep " type smbfs " | sed 's/^.*on *//' | sed 's/ *type.*//' \
      | sed 's/ /\\\ /g' | xargs -n1 -i{}  umount {}

I suspect there are simpler ways of getting this done, like killall
smbmount, but, this works, at least on my machine.

Joel 
On Thu, Dec 19, 2002 at 04:21:01PM -0800, George, John wrote:
> Sorry, I restarted the machine.
> 
> -----Original Message-----
> From: Joel Hammer [mailto:Joel at HammersHome.com]
> Sent: Thursday, December 19, 2002 4:17 PM
> To: George, John; samba at lists.samba.org
> Subject: Re: [Samba] smbmount
> 
> 
> What are you restarting?
> 
> Joel
> 
> On Thu, Dec 19, 2002 at 04:08:02PM -0800, George, John wrote:
> > Hi,
> > I have successfully mounted 2 directories using smbmount.  However, when I
> > restart, they are no longer mounted. 
> > 



More information about the samba mailing list