["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