full access to share for regular users
urban at svenskatest.se
Sun Jun 11 12:35:23 GMT 2000
On Sun, 11 Jun 2000, Hyung Kim wrote:
> I am new to samba and I have two questions. I have a
> linux box connected to a box running windows 98.
> Windows is set to share-level access control.
> 1. How do I allow nonroot users to "smbmount"?
Not sure. Do you have to?
Using autofs to do the mount automagically when someone accesses a share
allows you to avoid having to make smbmount/smbmnt setuid-root (if that
is necessary or if it helps). autofs runs a daemon as root, that can have
access to root owned 0400 configuration files (maps) and you can put the
plaintext passwords in those.
There is an automount howto and a lot of manpages on autofs.
The map looks like this
windoze -fstype=smbfs,username=x,password=y,uid=1,gid=2 ://windoze/c
(ooh, I forget if it's supposed to be ://machine or machine:/ both is
supposed to work, but I think only one does)
If you want different users to be able to mount as different users (user A
gets a view where A is owner, user B ...) then you'd have to have multiple
maps and mountpoints with different options for each user. It's not
terribly pretty but it works ok for a single user.
> 2. When I mount a share as root, root has full access
> to the share, however, a nonroot user has read-only
> access. How do I allow a regular user to have full
> access to a share?
The uid= and gid= parameters change the visible ownership of everything
% mount -t smbfs -o username=user,password=pass,uid=501,gid=100 //srv/tmp /mnt/x
% ls -l /mnt/x
-rwxr-xr-x 1 urban users 0 Jun 11 13:56 abc80*
More information about the samba