user ids and shares

Issues related to applications and software problems and general support
Post Reply
JackBauer
Posts: 24
Joined: 2020/05/19 13:56:35

user ids and shares

Post by JackBauer » 2020/11/17 08:17:39

Hello,

Do user ids affect in any way how users access shares?

If a user accesses a share from machine 1 and creates a file on share X, can the same user access the share X from machine 2 if they have different user ids?

Thanks

User avatar
KernelOops
Posts: 384
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: user ids and shares

Post by KernelOops » 2020/11/17 09:02:18

If its an NFS share, then yes it plays a role because NFS will honour ownership.

If its a Samba share without the unix extension, then definitely not. But I don't know more details when the unix extension is enabled, maybe someone who knows more about Samba shares can shed some light.
--
I love my computer - all my friends live there.
--

User avatar
jlehtone
Posts: 3173
Joined: 2007/12/11 08:17:33
Location: Finland

Re: user ids and shares

Post by jlehtone » 2020/11/17 14:37:04

Even with NFS ...
* NFSv3 transmits just uids, so they must match
* NFSv4 transmits username (that should match) but can fall back to uids.
* NFS with GSSAPI sends kerberos ticket, so it is the tickets that map to users

But there is more: authentication and authorization.
The uid/username/ticket is authentication: who you are.
Authorization says who may access a file. There can be more than one identity with access.

Of cource, if your uid is 1000 in machine 1 and 1001 in machine 2, both 1000 and 1001 can access the file,
and there is user "Joe" in machine 2 that has uid 1000, then Joe can access your file too.
In that sense the GSSAPI and Samba's authentication systems are better; Joe cannot easily pretend to be you.

BShT
Posts: 369
Joined: 2019/10/09 12:31:40

Re: user ids and shares

Post by BShT » 2020/11/17 20:28:49

if it is a samba share you can force user, force create mode, force directory mode and force group

then every file/directory handling will honor this

Post Reply

Return to “CentOS 8 - General Support”