You are not logged in.

#1 2004-06-13 04:01:02

SavageMessiah
Member
Registered: 2004-03-20
Posts: 76

Users mounting samba?

I've finally gotten back to playing with linux after a short hiatus fighting (and winning for the most part) with various iterations of windows. My problem is this: Tired of having to su to mount my shared dirs on my other box, I made a mount group, added my normal user account to it, and chowned mount and umount to that group. Please note this is the first time I've ever bothered with this sort of thing. When I go to mount the directory (using samba) I get the error: smbmnt must be installed suid root for direct user mounts (1000,1000).

Additionally, whenever I go to mount /mnt/cd it says that permission is denied when it tries to open fstab, this is after I 640'd it and set it to the mount group.

I'm probably just missing something simple here, but I'll be damned if I know what it is.

Offline

#2 2004-06-13 05:34:21

leejpar
Member
From: Texas, USA
Registered: 2004-05-28
Posts: 51
Website

Re: Users mounting samba?

I am just gonna address the smb mounts, since I have some experience with getting my SMB volumes to mount on my AL and Fedora clients.

The problem is just that, you need to run mount or smbmount as  root. After trying a lot of things, I have finally settled on the following solution.

What I do is write a bash script and then run it in "rc.local" at the end of the boot sequence. (actually all one line!)

mount -t smbfs -o username=lee,password=mypswd,uid=lee,gid=lee //samba/smb /mnt/smb

This is the best solution I have come up with so far.

Regards,
Lee


Linux Registered User #337161
'It's free. It works. Duh.'" - Eric Harrison

Offline

#3 2004-06-13 06:40:15

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Users mounting samba?

Or, you could just set the setuid bit on the smbmnt binary, like it says in the man page:

       A setuid smbmnt will only allow mounts on directories owned by the  us-
       er, and that the user has write permission on.

With something like this:

chmod u+s `which smbmnt`


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#4 2004-06-13 16:28:04

SavageMessiah
Member
Registered: 2004-03-20
Posts: 76

Re: Users mounting samba?

Thanks for your help xentac ,leejpar. I'll be sure to check man pages first from now on. One last thing, is there a way to unmount samba using the normal umount rather than smbumount? I can umount everything else fine.

Offline

#5 2004-06-13 17:51:18

leejpar
Member
From: Texas, USA
Registered: 2004-05-28
Posts: 51
Website

Re: Users mounting samba?

Generally I find I get the message "... busy ..." when I try to unmount an smb volume. However, if you use the lazy "l" flag, you can unmount it, for example:

umount -l /mnt/media

Lee


Linux Registered User #337161
'It's free. It works. Duh.'" - Eric Harrison

Offline

#6 2004-06-13 17:56:06

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Users mounting samba?

If it's busy, it means that something is accessing those directories... like an xterm that's cd'd into it...


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#7 2004-06-13 19:48:49

SavageMessiah
Member
Registered: 2004-03-20
Posts: 76

Re: Users mounting samba?

It's not that it's busy. It just says that only root can unmount that share. I can unmount say, my cdrom, but not a samba share. This is using umount, smbumount works fine. Oh, and I'm trying to umount using the same user that mounted it if you're wondering tongue.

Offline

#8 2004-06-13 20:54:38

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Users mounting samba?

The intricacies are complicated, but you will have to use smbumount to unmount an smb share you moutned with smbmount.  It's just the way it is.

By setting up specific shares as user shares in /etc/fstab, you can get around this, but you need root to modify your fstab anyway (only once though).


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#9 2004-06-14 17:21:00

SavageMessiah
Member
Registered: 2004-03-20
Posts: 76

Re: Users mounting samba?

Actually, the share I've been referring to is set as a user share in fstab. It doesn't really matter though, this way works fine.

Offline

Board footer

Powered by FluxBB