NFS v4 - kerberos authenticated user to ID mapping not working
Issue
Both hosts are keyed with host/ and nfs/ principals in the same kerberos realm: EXAMPLE.COM
The client is configured with a keytab for a kerberos principal, principal1@EXAMPLE.COM which is perpetually renewed.
The idmapd.conf on both client and server have been configured with:
[General]
Domain = example.com
Local-Realms = EXAMPLE.COM
[Mapping]
[Translation]
Method = static,nsswitch
GSS-Methods = static,nsswitch
[Static]
principal1@EXAMPLE.COM = localuser
The kerberos principal principal1@EXAMPLE.COM does NOT exist as a local user on either client or server.
The user localuser exists on BOTH client and server and is a member of UNIX groups users and dba with matching UID/GID and group memberships on both client & server.
I am expecting that a user having valid credentials as principal1@EXAMPLE.COM on the CLIENT will be authorized as localuser:dba on the server. This is not the experience that I am observing. The mapping does not seem to be working as attempts to create files across the NFS mount are being done so as the user nfsnobody.
I observe in the gssproxy debug out that the security context for the principal is being received by the server.
I also see the rpc.idmapd logging entries equating the UID of localuser (26030003) and GID of dba (34) correctly being mapped to localuser.
Environment
- Red Hat Enterprise Linux 7.9
- NFS
- Kerberos
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.