SUMMARY: Samba / cifs - permissions

"Edward Matuszak" <[email protected]>
Newsgroups gmane.linux.admin.managers
Message-ID <[email protected]>
Original post:

I'm a bit confused regarding the various Samba/Unix access/permissions
password/account relationships.  Is there a document/cookbook that ties it
all together?  i.e. How does one mount a windows share and have it appear to
be owned by the unix user equivalent to the windows user as indicated in the
smbusers file?

I don't even want to think about the firewall at this point, but that's
still yet another item that needs to be addressed later.

Here is the environment:

on windows 2k:  netbios name xxx, share name yyy, user=user1,
password=usr1pw
on RH9 Linux: linux user is user1
in smbusers: user1=user1, user1 has an entry in smbpasswd with same password
as on w2k system viz. "usr1pw"

#mkdir /zzz
#chown user1 /zzz
#smbmount //xxx/yyy /zzz -o username=user1,password=usr1pw

all files/dirs under /zzz appear to be owned by root and the permissions are
r-x,
however root on the linux box can write, mkdir, etc., into anything under
/zzz

____________________________________________________________________________
_____

Answer:

The answer was in the Linux mount options - I needed to add a Linux user and
group id to the smbmount command (otherwise the default was for the mounted
files to appear to be owned by the linux root user).

Here's the command that worked:

#smbmount //xxx/yyy /zzz -o
username=user1,password=usr1pw,uid=user1,gid=grp1,\
fmask=600,dmask=700

uid and gid are local Linux users, username and password are for the w2k
access to the share (connect validation)

fmask sets the perceived linux access for files to      -rw-------
dmask "                         "   directories to      drwx------

and all the files and directories on /zzz appear to be owned by the linux
user "user1" and in the group "grp1"

smbpasswd is not used for client access to windows shares.
_______________________________________________
LinuxManagers mailing list - http://www.linuxmanagers.org
submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected]
subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.