Bug 76343 - Unmount of smb share fails as user
Unmount of smb share fails as user
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: mount (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-20 09:32 EDT by Paul Moore
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-19 17:53:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Moore 2002-10-20 09:32:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
Once  a smb share is mounted as a user, it cannot be unmounted by that same user
- local root privilage is required.

Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:
1. Add entry "//server/share /home/user/mountpoint smbfs noauto,user,rw  1 6" to
/etc/fstab
2. As a mortal user, run "mount /home/user/mountpoint"
3. Enter the password matching the user on the sbb server at the Password: prompt.
4. Mount succeeded.
5. Run "umount /home/user/mountpoint"

Actual Results:  Error message: 
umount: only root can unmount //server/user from /home/user/mountpoint
umount fails.

Expected Results:  Should have unmounted successfully.

Additional info:

Sure enough, when changing to the root user on "client machine" the umount works
successfully.
Comment 1 Elliot Lee 2003-01-13 17:05:22 EST
Once the share is mounted, what are the /etc/mtab and /proc/partitions lines for the 
mount?
Comment 2 Paul Moore 2003-01-15 11:36:41 EST
This behaviour occurs for samba-client-2.2.5-10 but is no longer apparent in
samba-client-2.2.7-2 (dated Fri 22 Nov 2002), which was installed on Sun 01 Dec
2002 after his bug was submitted on 20 Oct 2002.

The behaviour is now a failure once the mount is initiated by a user and the
password is entered. The following message appears:

smbmnt must be installed suid root for direct user mounts (500,500)
smbmnt failed: 1

Running the command 'chmod u+s `which mount`' does not resolve the problem.
Running the command 'chmod u+s `which smbmount`' generates error:

libsmb based programs must *NOT* be setuid root.
18476: Connection to alive failed
SMB connection failed

.......but I guess that's a different bug really.
Comment 3 Elliot Lee 2003-02-19 17:53:08 EST
It looks like samba's smbmnt program isn't meant to securely handle this use
case, so for now the only solution is to mount as root.

Note You need to log in before you can comment on or make changes to this bug.