You are not logged in.
Pages: 1
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
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
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
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
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
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
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 .
Offline
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
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
Pages: 1