Networking Forums

Networking Forums > Computer Networking > Linux Networking > smbumount does not seem to be unmounting

Reply
Thread Tools Display Modes

smbumount does not seem to be unmounting

 
 
R Kannan
Guest
Posts: n/a

 
      03-06-2005, 01:04 PM
Hi,

I have bash script segment as follows..

if [ -z "`grep bhas/Gateway /etc/mtab`" ]; then
echo =============
echo 'Bhas is not mounted'
echo =============
else
echo =============
echo 'Bhas is mounted'
echo =============
sudo -u bhas smbumount ~bhas/Gateway
fi

When I execute this (as root) I expect the samba mount to be removed.
Instead I find that the link still remains but just gets removed from
/etc/mtab. I can go to ~bhas/Gateway and access the files in the Windoze
file system that is mounted there.

BTW, the samba file system was mounted originally as

smbmount //Gateway2000/K ~bhas/Gateway

Thanks for any help

 
Reply With Quote
 
 
 
 
Dances With Crows
Guest
Posts: n/a

 
      03-06-2005, 02:05 PM
["Followup-To:" header set to comp.os.linux.misc.]
On Sun, 06 Mar 2005 09:04:31 -0500, R Kannan staggered into the Black
Sun and said:
> smbmount //Gateway2000/K ~bhas/Gateway


Which user was this done as? Does that user own the mount point? How
did you manage to get this to work, anyway? You usually have to specify
user= and workgroup= to mount an SMB share.

> if [ -z "`grep bhas/Gateway /etc/mtab`" ]; then
> echo 'Bhas is not mounted'
> else
> echo 'Bhas is mounted'
> sudo -u bhas smbumount ~bhas/Gateway
> fi
> When I execute this (as root) I expect the samba mount to be removed.
> Instead I find that the link still remains but just gets removed from
> /etc/mtab. I can go to ~bhas/Gateway and access the files in the
> Windoze file system that is mounted there.


Weird. Check sudo's return value and the system log files; make sure
that the smbumount command succeeded. Think about using mount and
umount instead of smbmount directly; it's less to type and all you have
to do is put a line in fstab like so:

//gateway2000/k /mnt/somewhere smbfs noauto,users,user=USER,
workgroup=DOMAIN,password=SECRET 0 0

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
 
Reply With Quote
 
buck
Guest
Posts: n/a

 
      03-07-2005, 04:55 PM
On 6 Mar 2005 15:05:56 GMT, Dances With Crows
<(E-Mail Removed)> wrote:

>["Followup-To:" header set to comp.os.linux.misc.]
>On Sun, 06 Mar 2005 09:04:31 -0500, R Kannan staggered into the Black
>Sun and said:
>> smbmount //Gateway2000/K ~bhas/Gateway

>
>Weird. Check sudo's return value and the system log files; make sure
>that the smbumount command succeeded. Think about using mount and
>umount instead of smbmount directly; it's less to type and all you have
>to do is put a line in fstab like so:
>
>//gateway2000/k /mnt/somewhere smbfs noauto,users,user=USER,
>workgroup=DOMAIN,password=SECRET 0 0


I have to kill the mount.smbfs process immediately before the umount
in order to Make It Happen:
PS=`pidof mount.smbfs` ; kill $PS
umount /mountpoint
--
buck

 
Reply With Quote
 
R Kannan
Guest
Posts: n/a

 
      03-09-2005, 10:15 PM
I do not have such a process ruinning on my machine

ps -elf |grep smbfs

produces no such process. However, my smbfsmounts are still available. BTW,
I am using SuSE9.0 running kernel 2.4.21

buck wrote:

>
>
> Re: smbumount does not seem to be unmounting
> From:
> buck <(E-Mail Removed)>
> Date:
> Monday 07 March 2005 12:55:54
> Groups:
> comp.os.linux.networking
> References: 1 2
>
> On 6 Mar 2005 15:05:56 GMT, Dances With Crows
> <(E-Mail Removed)> wrote:
>
>>["Followup-To:" header set to comp.os.linux.misc.]
>>On Sun, 06 Mar 2005 09:04:31 -0500, R Kannan staggered into the Black
>>Sun and said:
>>> smbmount //Gateway2000/K ~bhas/Gateway

>>
>>Weird.**Check*sudo's*return*value*and*the*system*log*files;*make*sure
>>that the smbumount command succeeded.**Think*about*using*mount*and
>>umount instead of smbmount directly; it's less to type and all you have
>>to do is put a line in fstab like so:
>>
>>//gateway2000/k**/mnt/somewhere**smbfs**noauto,users,user=USER,
>>workgroup=DOMAIN,password=SECRET**0**0

>
> I have to kill the mount.smbfs process immediately before the umount
> in order to Make It Happen:
> PS=`pidof mount.smbfs` ; kill $PS
> umount /mountpoint
> --
> buck


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unmounting NFS directory when it is not available Ignoramus3938 Linux Networking 2 03-20-2007 03:22 AM
autofs not unmounting nfsd mounts Jack Snodgrass Linux Networking 1 09-13-2006 03:46 PM
Unmounting NFS Server munish.nr@gmail.com Linux Networking 3 03-04-2006 01:05 PM



1 2 3 4 5 6 7 8 9 10 11