[Fwd: Re: Mounting samba shares]
urban at teststation.com
Thu Feb 8 00:33:41 GMT 2001
On Tue, 6 Feb 2001, Chris Jensen wrote:
> Surely there must be some way around this. Since mounting the share as
> root means that any user would then have to su in order to access their
> files. There must be some way for a paricular user to have a share
> mounted using their user name so they have permission to access the
> appropriate files.
autofs is one option. Root owns the list of what can be mount where. It is
mounted and unmounted automatically when someone accesses it. uid/gid and
permission masks are set as mount options giving the user (an illusion of)
ownership of the files on the share. No suid smbmnt needed.
smbmnt setuid allows any user to mount any smb share on any directory they
own and have rwx permission on. The manpage says that smbmnt "is meant to
be", poor wording perhaps. If you need user mounts then you can but if
you can avoid it then do.
smbmnt does not care about /etc/fstab user options. Maybe it should (more
standard). The mount_ok() function can be changed to look at the user
option instead of directory ownership. It still needs setuid however.
And don't make smbmount setuid.
More information about the samba