I have an NFS export on a Linux host that works great for a few clients with local users, and now I’m looking to connect a Windows SMB client to the same file system. The Windows client and its users are part of an AD domain. The users that would be granted SMB access already have Unix accounts with local UIDs, but there exists no identity mapping between AD and the local UIDs. I’d like to manually map the few AD users’ SIDs to local UIDs so that ownership and permissions within the file system remains intact as these users access the file system from different clients. I’d be using Samba to present the SMB share and I don’t have control over the AD environment. What’s the best way to do this?
There is a lot of information on this topic but I’m struggling to find current best practices. Using
net groupmap seems to be a good solution for mapping group SIDs but I don’t see an equivalent for user SIDs. I also noticed Samba supports a
username map file but it doesn’t appear to have any affect. I created a map between a local user and an AD user but after authenticating and creating a few files via SMB as the AD user, the ownership, when viewed from an NFS client, shows a UID in the range that was defined with
idmap config AD : range = rather than the UID of the local user in the map file.