1
I am running Samba 4.9.1 on RHEL7, joined to a Win AD domain. In one share, I set
force user = foo
, hoping to force the local user foo. However, the same user name also exists in the AD, and Samba actually uses the AD user e.g. upon file creation.
getent passwd foo
returns the local user, as expected, since /etc/nsswitch.conf reads
passwd: files winbind
group: files winbind
Obviously, I set the option
winbind use default domain = yes
in smb.conf, and I would prefer not to change that, since I am not sure how many things I would need to change elsewhere then...
Any hints how to force Samba to look for local users first?
Regards, Eric
Fyi, I now "solved" this by removing 'force user' altogether and going for (default) ACLs on the shared directory, which is probably the cleanest way to do it. This also allows to see which user created which new file. Leaving the question open however, since that might not be a feasible way for others (e.g. on filesystems without ACL support). – Eric – 2019-11-06T15:17:19.097
Please add this as an answer and accept it so that others can easily find your solution in the future. – Worthwelle – 2019-11-06T16:02:25.777