Hello, recently I've ran into the problem that if a user mounts a share 
multiple times, then it cannot be mounted, except by root. Here is the 
relevant fstab line:

//sephiroth/E /home/unity/Sephiroth smbfs ro,users,noauto 0 0

A user can mount and unmount the fs fine:

[EMAIL PROTECTED] ~ $ cd ~unity/
[EMAIL PROTECTED] ~ $ mount Sephiroth/
Password:
[EMAIL PROTECTED] ~ $ mount | grep Seph
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)
[EMAIL PROTECTED] ~ $ umount Sephiroth/
[EMAIL PROTECTED] ~ $ mount | grep Seph
[EMAIL PROTECTED] ~ $ 

Unless the fs is mounted twice by accident:

[EMAIL PROTECTED] ~ $ mount Sephiroth/
Password:
[EMAIL PROTECTED] ~ $ mount Sephiroth/
Password:
[EMAIL PROTECTED] ~ $ mount | grep Seph
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)
[EMAIL PROTECTED] ~ $ umount Sephiroth/
umount: it seems /home/unity/Sephiroth is mounted multiple times
[EMAIL PROTECTED] ~ $ mount | grep Seph
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)

Then, it seems the only way to unmount it in once as as root, and then as a 
user:

[EMAIL PROTECTED] ~ $ su -c "umount Sephiroth/"
Password:
[EMAIL PROTECTED] ~ $ mount | grep Seph
//sephiroth/E on /home/unity/Sephiroth type smbfs (0)
[EMAIL PROTECTED] ~ $ umount Sephiroth/
[EMAIL PROTECTED] ~ $ mount | grep Seph
[EMAIL PROTECTED] ~ $ 

If you are wondering, something that is not a samba share cannot be mounted 
multiple times:

[EMAIL PROTECTED] ~ $ mount Mp3/
mount: /dev/hdc1 already mounted or /home/unity/Mp3 busy
mount: according to mtab, /dev/hdc1 is already mounted on /home/unity/Mp3

I do not like that a user can mount it, but then if it is mounted twice, the 
user would not be able to umount it. I do not see why a user should need root 
privelages to umount something, even if it is marked with the users option. I 
know from experience that if the Samba server that is serving the share goes 
offline, then various programs will freeze upon trying to access the 
directory, and the user will have no way to unmount it.

I am wondering if there is a solution to this problem.

I am using smbclient Version 3.0.22, and my kernel is 2.6.16-gentoo-r9. If any 
other information may be relevant, I can supply it. Thanks in advance.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Reply via email to