Replication sets wrong user/group on dataset due to UID discrepancy

AlcSi

Dabbler
Joined
Sep 20, 2019
Messages
41
As title says.
Let's imagine my NAS1 (TrueNAS 12) has "admin" and "admingp" as user and group on a given dataset.
The replication on a NAS2 (TrueNAS 12) will end up with, say, "John" and "HR" as user and group...
(Although the groups "admin" and "admingp" do exist on NAS2 !)

I've pinpointed the issue to UID's : indeed, "admin" on NAS1 has the same UID as "John" on NAS2, and "admingp" on NAS1 has the same GID as "HR" on NAS2.
So I'm guessing it's just the ID's that are used to set permissions and this explains that.

But what can I really do ? In my mind, playing around with UID's/GID's is a bad idea... and the interface doesn't allow it anyway.
Do I need to recreate all users and groups on NAS2 to match NAS1's ID's ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Short answer: yes.

Long answer: for any distributed file sharing architecture that relies on some "Unix" as the backend it is mandatory that user and group IDs match across all devices. This is why NIS and Active Directory (among other solutions) exist.

If your setup is only two systems and you think setting up a directory service is overkill, you need to make sure the IDs match manually.

HTH,
Patrick
 

AlcSi

Dabbler
Joined
Sep 20, 2019
Messages
41
I actually have a ADDC which is setup, so I'm going for the AD-account solution. Thanks !
 
Top