Ans:
No, the problem is that the uids on the two samba servers are
different for the same user. This is because you are using
(the default of) "idmap backend = tdb". This assigns increasing
uids (per server) to users in the the order the access the server.
If you need the same user ids, you have (at least) the following
two options:
1. Use "idmap backend = rid". Then a user gets the the
uid built as LOW_RANGE_UID + RID.
Here LOW_RANGE_UID is the lower bound of the range
"idmap uid = LOW_RANGE_UID - HIGH_RANGE_UID"
and RID is the "relative identifyer": the user SID
is built as follows: DOMAIN_SID-RID. i.e. the rid
is the last block of digits of the user's sid, hence
is unique inside one domain, and users will get the
same uid on all samba servers using "idmap backend = rid".
See the man paget idmap_rid(8).
2. Use "idmap backend = ad":
When you install the SFU (Services For Unix) schema
extensions, then you can set unix attributes for users
and groups in actice directory. and the same uid is
obtained for users on all samba servers using this backend.