[Samba] RedHat 7.3 smbmount

Joel Hammer Joel at HammersHome.com
Tue Aug 6 17:38:26 GMT 2002


I am a bit surprised there isn't a provision in the network script
to unmount all your smbmounted shares when the network is taken down.
I would poke around in it (likely /etc/rc.d/init.d/network or something
similar) to see if there is some provision for it, and try to see why
it isn't working. You can post it if you can't understand bash or just
need help trying to figure it out. These simple scripts can get very
complicated. When Redhat goes down (or up) I believe it prints to the
screen what it is doing, and there should be an entry about SMB mounts,
I think.

Here is what I have written for my caldera 2.4 box to umount these shares
when I reboot or the network goes down:

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

This is simply a way to create an umount command from the output of
mount. I put this into my network script in the shutdown section.
It works.

Joel


On Tue, Aug 06, 2002 at 07:52:27PM -0400, John Hines wrote:
> Hello,
> 
> I have a RedHat 7.3 workstation and have created a samba mount to my samba server.  Everything seems to be working ok, 
> but when I reboot my RH workstation the mount is not reestablished.  I believe the problem is that when I reboot the machine
> the samba share is not unmounted.  After rebooting the machine when I run smbstatus on the samba server it indicates the mount
> is still active.
> 
> Samba version 2.2.5
> Service      uid      gid      pid     machine
> ----------------------------------------------
> tmp          nobody   nobody   11311   gimli    (192.168.1.12) Tue Aug  6 23:30:
> 59 2002
> 
> I when I run smbumount before I reboot I don't run into the problem.  Is there any way to fix this problem without having to manually 
> unmout the shares every time i reboot or power down my Linux box?
> 
> Here is my /etc/fstab on my Linux box:
> 
> ...
> //pcs2/homes            /mnt/pcs2/home/jhines   smbfs   credentials=/var/tmp/pass,uid=jhines,gid=jhines 0 0
> //pcs2/tmp              /mnt/pcs2/tmp           smbfs   scope=guest     0 0
> 
> 
> 
> Thank You,
> 
> John Hines
> 
> 
> 
> 




More information about the samba mailing list