Kerberos NFS series. Previous: Secure NFS with MIT Kerberos on AlmaLinux 10 and Rotate NFS Keytabs Safely on AlmaLinux 10. The basics of joining a Linux server to a domain are in Join CentOS/RedHat to Active Directory Domain. This post does the same Secure NFS setup with Active Directory as the KDC instead of an MIT KDC.
Most Linux shops do not run their own MIT KDC. They already have Active Directory, and every domain controller is a Kerberos KDC. That is enough for Kerberized NFSv4. You do not need a separate realm, a keytab copied from somewhere, or a trust. The NFS server and its clients join the domain with realm join. Then you add the nfs/ service principal names (SPNs) to the server’s computer account with adcli update --service-name=nfs, and export the share with sec=krb5p. Users log in with their AD accounts and get encrypted, authenticated NFS. This guide covers each step on AlmaLinux 10: realmd and adcli, what ends up in the keytab, AES encryption types, the NFSv4 ID mapping trap with SSSD’s fully qualified names, exports, client mounts, a user test with kinit, verification and a troubleshooting table. The same commands work on RHEL 10 and 9, Rocky Linux, Oracle Linux and CentOS Stream. EL9 differences are noted where they matter.
Option names in this post were checked against the man pages in the AlmaLinux 10 packages (adcli 0.9.3.1, realmd 0.17.1, sssd 2.13.1, nfs-utils 2.8.3, sssd-nfs-idmap) and against the adcli and realmd source. The ID-mapping and crypto-policy results come from lab runs with those packages. A real AD join and a kernel NFS mount could not be run in the lab. The section What was tested and what was not lists exactly what was and was not tested.
Lab layout used in this guide
| Host | Role | Notes |
|---|---|---|
dc1.ad.example.com | Windows Server domain controller and DNS | AD domain ad.example.com, Kerberos realm AD.EXAMPLE.COM |
nfs1.ad.example.com | AlmaLinux 10 NFS server | Computer account NFS1$ with extra nfs/ SPNs; gssproxy |
client1.ad.example.com | AlmaLinux 10 NFS client | Computer account CLIENT1$; rpc.gssd |
alice | AD user | Member of the AD group nfsusers |
Replace the names with your own. The realm is always the AD DNS domain in upper case.
How AD Kerberos NFS fits together
- Server identity. When a client mounts
nfs1.ad.example.com, it asks the KDC for a ticket tonfs/nfs1.ad.example.com@AD.EXAMPLE.COM. In AD that name is an SPN, an attribute on the computer accountNFS1$. The DC encrypts the ticket with that account’s key. The NFS server needs the same key in/etc/krb5.keytabunder thenfs/name, and gssproxy uses it to accept the ticket. - Client identity.
rpc.gssdneeds a machine credential for mount and state operations. Its man page lists the keytab search order, and the first entry is<HOSTNAME>$@<REALM>: the AD computer account itself. So a client joined to AD needs no extra SPN. - User identity. Users get a ticket from the DC (at login through SSSD, or with
kinit).rpc.gssduses it for that user’s file access. - Names and numbers. SSSD turns AD users into UIDs and GIDs. NFSv4 sends file owners as
user@domainstrings, whichnfsidmap/rpc.idmapdtranslate on each side. Both sides must agree on the names and the numbers. That is the part that most often goes wrong. See Step 6.
Prerequisites
- DNS from AD. Both Linux hosts use the domain controllers as resolvers (or a resolver that forwards
ad.example.comto them). Discovery uses SRV records such as_ldap._tcp.ad.example.com. Give each host an A record and a PTR record. - Fully qualified host names inside the AD DNS domain:
sudo hostnamectl set-hostname nfs1.ad.example.com. The name clients type inmountmust match the SPN. - Time within 5 minutes of the DCs. Point chrony at the DCs, or at the same source they use.
- Ports from the Linux hosts to the DCs: 53 (DNS), 88 (Kerberos), 389 (LDAP), 464 (kpasswd, used to change the machine password), 3268 (Global Catalog) and 123/udp if you sync time with them. From client to server, only 2049/tcp for NFSv4.
- An AD account that may join computers to the target OU. A normal user can join up to 10 computers by default (the
ms-DS-MachineAccountQuotalimit). For servers, use a delegated account or a pre-created computer object. - AES enabled in AD (the default for computer accounts on any supported Windows Server). RC4 is not needed and stays off. See Step 5.
Install the packages on both hosts. nfs-utils and gssproxy are needed on the server; nfs-utils on the client (it brings rpc.gssd):
sudo dnf install -y realmd sssd adcli oddjob oddjob-mkhomedir krb5-workstation nfs-utils gssproxy
These match the package list that realmd itself checks on the Red Hat family (/usr/lib/realmd/realmd-distro.conf: sssd-common, oddjob, oddjob-mkhomedir, sssd-ad, adcli). realm join can install missing ones by itself.
Step 1: Discover the domain
realm discover ad.example.com
Check these lines in the output: type: kerberos, realm-name: AD.EXAMPLE.COM, server-software: active-directory, client-software: sssd and configured: no. adcli info ad.example.com shows similar information directly from a DC. If discovery fails, it is almost always DNS. In the lab, a name without SRV records gave exactly this:
adcli: couldn't discover domain: ad.example.invalid
Test the records with dig -t SRV _ldap._tcp.ad.example.com before you go on.
Step 2: Decide on user name format before you join
By default, realmd configures SSSD with use_fully_qualified_names = True. Users are then called alice@ad.example.com, and id alice fails. For a single AD domain used for NFS, short names make NFSv4 ID mapping simple (Step 6 shows why, with lab results). realmd reads this from /etc/realmd.conf at join time (realmd.conf(5)):
# /etc/realmd.conf
[ad.example.com]
fully-qualified-names = no
# automatic-id-mapping = no # only if your AD users have uidNumber/gidNumber (RFC 2307)
If you keep fully qualified names (for example, because you have several trusted domains), that is fine too. You then use the SSSD idmap plugin described in Step 6. Make the same choice on every NFS server and client.
Step 3: Join the server and the client
On nfs1 (and the same on client1). --computer-ou is optional and takes the full DN of the OU:
sudo realm join -U Administrator --computer-ou="OU=Linux Servers,DC=ad,DC=example,DC=com" ad.example.com
realm list
sudo adcli testjoin
id alice
realm join runs adcli join, writes /etc/sssd/sssd.conf, sets default_realm = AD.EXAMPLE.COM in /etc/krb5.conf, runs authselect select sssd with-mkhomedir and starts SSSD and oddjobd. In realmd’s source, the generated domain section contains id_provider = ad, ad_domain, krb5_realm, cache_credentials = True, ldap_id_mapping, use_fully_qualified_names (from Step 2), fallback_homedir and default_shell. The result looks like this:
[sssd]
domains = ad.example.com
services = nss, pam
[domain/ad.example.com]
id_provider = ad
ad_domain = ad.example.com
krb5_realm = AD.EXAMPLE.COM
realmd_tags = manages-system joined-with-adcli
cache_credentials = True
krb5_store_password_if_offline = True
ldap_id_mapping = True
use_fully_qualified_names = False
fallback_homedir = /home/%u@%d
default_shell = /bin/bash
access_provider = ad
(That is the shape of the file, not a copy from a joined host. Your file may differ in small details.) To log in to the NFS server itself, you can limit access with realm permit -g nfsusers. The older walkthrough in Join CentOS/RedHat to Active Directory Domain shows the same flow on EL7. The realmd commands have not changed.
adcli testjoin authenticates with the new keytab. If it succeeds, the machine account and the key are good. If you join with a Kerberos ticket instead of a password, run kinit Administrator@AD.EXAMPLE.COM first and omit -U. realm then passes the credential cache to adcli.
Step 4: Add the nfs/ SPNs to the server’s computer account
After the join, the computer account has the two default SPN types, host/ and RestrictedKrbHost/, each for the short name and the FQDN. realm join has no option to add more, so add the NFS service with adcli on the NFS server:
sudo adcli update --service-name=nfs -v
--service-name=nfs creates nfs/NFS1 and nfs/nfs1.ad.example.com on the account and in the keytab. According to the adcli man page, SPNs are synced between the keytab and AD on every update, so the existing host/ SPNs stay. (The adcli 0.9.3.1 source also merges the server-side list, and on a join it always adds host and RestrictedKrbHost next to any --service-name you give.) While the machine password is still valid, adcli copies the existing keys to the new principal names rather than changing the password, so no other service on the host loses its key.
By default, adcli update logs in as the machine account itself. AD normally lets a computer write SPNs for its own host names (the “Validated write to service principal name” permission). If your OU is hardened and the update is refused, run it with an admin ticket:
kinit Administrator@AD.EXAMPLE.COM
sudo adcli update -C --service-name=nfs -v # -C = use the default credential cache
Note that sudo may not see your ticket cache. Run kinit as root (sudo -i), or pass the cache explicitly with --login-ccache=FILE:/path. The equals sign is required there. A second name for the server (for example files.ad.example.com) needs an explicit SPN. Because it is not the computer’s own name, it usually needs the admin ticket:
sudo adcli update -C --add-service-principal=nfs/files.ad.example.com
# remove it again later with:
sudo adcli update -C --remove-service-principal=nfs/files.ad.example.com
SPNs must be unique in the forest. If nfs/nfs1.ad.example.com was registered on another account in the past (an old computer object, or a service user someone used with ktpass), the KDC cannot decide which key to use. On a Windows admin host, setspn -L NFS1 lists the SPNs of the account and setspn -Q nfs/nfs1.ad.example.com shows who owns a name. From Linux, adcli show-computer -C nfs1 prints the computer’s attributes, including servicePrincipalName.
Step 5: Check the keytab and the encryption types
sudo klist -ke /etc/krb5.keytab
You should see entries for NFS1$@AD.EXAMPLE.COM, host/NFS1, host/nfs1.ad.example.com, the two RestrictedKrbHost/ names and now nfs/NFS1@AD.EXAMPLE.COM and nfs/nfs1.ad.example.com@AD.EXAMPLE.COM, all with the same kvno and with aes256-cts-hmac-sha1-96 and aes128-cts-hmac-sha1-96. Check that the KDC agrees:
kinit alice@AD.EXAMPLE.COM
kvno nfs/nfs1.ad.example.com@AD.EXAMPLE.COM
sudo kvno -k /etc/krb5.keytab nfs/nfs1.ad.example.com@AD.EXAMPLE.COM
The kvno printed by the first kvno must be in the keytab, and kvno -k must report the keytab entry as valid (see the rotation post for what an invalid entry looks like).
Encryption types. Active Directory does not implement the RFC 8009 SHA-2 types, so AD tickets use the AES SHA-1 types. That is fine: they are allowed by the AlmaLinux 10 DEFAULT crypto policy. The lab generated the Kerberos part of the policies with the AlmaLinux 10 crypto-policies generator:
DEFAULT:
permitted_enctypes = aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
DEFAULT:AD-SUPPORT:
permitted_enctypes = aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
DEFAULT:AD-SUPPORT-LEGACY:
permitted_enctypes = aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5
So on EL10 no subpolicy is needed for an AES-capable domain. Only AD-SUPPORT-LEGACY adds RC4 (arcfour-hmac-md5), and you should only use it if some accounts in AD really still lack AES keys. On EL9 the RC4 subpolicy has the same name, AD-SUPPORT-LEGACY (Red Hat renamed it from EL8’s AD-SUPPORT). When adcli joins, it sets msDS-supportedEncryptionTypes on the computer object, using AD’s defaults filtered by what krb5.conf permits (adcli man page), so the account ends up AES-only. On the server, cat /proc/fs/nfsd/supported_krb5_enctypes must include 18 and 17 (aes256 and aes128 SHA-1).
Step 6: ID mapping: names, numbers and idmapd.conf
Same numbers on every host
With ldap_id_mapping = True (the realmd default), SSSD computes UIDs and GIDs from the AD SID. According to sssd-ad(5), the domain SID is hashed with murmurhash3 to pick an ID range slice, so all SSSD hosts with the default range settings compute the same numbers. The same page warns that a hash collision can give different slices on different machines. For NFS, where numbers must match everywhere, either set ldap_idmap_default_domain_sid to your domain SID (that domain always gets slice zero), or store POSIX attributes in AD and join with automatic-id-mapping = no. Use POSIX attributes as well if non-SSSD NFS clients or servers (a NAS, other operating systems) share the files.
# both hosts must print the same numbers
id alice
getent group nfsusers
Same NFSv4 domain
Set the NFSv4 ID-mapping domain on the server and all clients to the AD DNS domain:
# /etc/idmapd.conf
[General]
Domain = ad.example.com
nfsidmap -d # prints the effective domain
sudo nfsidmap -c # clear the kernel ID-mapping cache after changes
Fully qualified names and the nsswitch plugin: lab results
This is where the user-name decision from Step 2 matters. The default Method = nsswitch builds the wire name from the local user name plus @Domain, and on input it strips the domain before looking up the user. The lab ran the AlmaLinux 10 libnfsidmap nsswitch plugin through a small test program against a user database with an SSSD-style fully qualified user alice@ad.example.com (UID 1786401105). With only Domain = ad.example.com:
default domain: ad.example.com
name_to_uid(alice@ad.example.com) -> error -2 (No such file or directory)
uid_to_name(1786401105) -> alice@ad.example.com@ad.example.com
gss_princ_to_ids(alice@AD.EXAMPLE.COM) -> error -2 (No such file or directory)
The owner goes on the wire as alice@ad.example.com@ad.example.com, and an incoming alice@ad.example.com is not found. Such files show up as nobody. With the same user database and short names (use_fully_qualified_names = False), everything maps:
name_to_uid(alice@ad.example.com) -> 1786401105
uid_to_name(1786401105) -> alice@ad.example.com
gss_princ_to_ids(alice@AD.EXAMPLE.COM) -> uid 1786401105 gid 1786400513
name_to_uid(alice@wrong.example.com) -> error -22 (Invalid argument)
The last line shows the other classic mistake: a name in a different NFSv4 domain is rejected. That is what you get when Domain differs between server and client. If you must keep fully qualified names, there are two options:
| Option | idmapd.conf | Notes |
|---|---|---|
| Short names (recommended for one domain) | Domain = ad.example.com | Tested above. Set fully-qualified-names = no before joining, or use_fully_qualified_names = False in sssd.conf and sudo sss_cache -E; sudo systemctl restart sssd |
| SSSD idmap plugin | [Translation]Method = sss | Package sssd-nfs-idmap. Its man page sss_rpcidmapd(5) says it needs the SSSD NSS responder and requires use_fully_qualified_names on all domains. Not tested here |
| nsswitch with No-Strip | No-Strip = both in [General] | Lab: name_to_uid(alice@ad.example.com) → 1786401105 and the wire name becomes alice@ad.example.com; principal-to-ID mapping in this plugin still failed |
The principal-to-user mapping on the server (which UID alice@AD.EXAMPLE.COM becomes) is done by gssproxy through the Kerberos localname rules. With short names, the default rule (strip the default realm) gives alice. With fully qualified names, SSSD’s Kerberos localauth plugin has to do it. sssd-krb5-common ships /etc/krb5.conf.d/enable_sssd_conf_dir, which includes the directory where SSSD writes that configuration (/var/lib/sss/pubconf/krb5.include.d/). This is another reason to prefer short names for NFS.
Step 7: Export the share on nfs1
The NFS part is the same as in the MIT Kerberos post: gssproxy holds the keys for the kernel NFS server, using the [service/nfs-server] section in /etc/gssproxy/24-nfs-server.conf (cred_store = keytab:/etc/krb5.keytab, kernel_nfsd = yes). The keytab is the one adcli just wrote, so nothing needs to be changed there.
sudo mkdir -p /srv/nfs/secure
sudo chgrp nfsusers /srv/nfs/secure # AD group (short names; else "nfsusers@ad.example.com")
sudo chmod 2770 /srv/nfs/secure
# /etc/exports
/srv/nfs/secure *.ad.example.com(rw,sync,sec=krb5p:krb5i:krb5)
The sec= list is in order of preference (exports(5)). krb5 authenticates only, krb5i adds integrity checks, and krb5p also encrypts the traffic. To force encryption, use sec=krb5p alone. Never add sys to a share you are protecting. Configure an NFSv4-only server and start it:
# /etc/nfs.conf.d/10-secure.conf
[nfsd]
vers3=n
vers4=y
vers4.0=n
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --reload
sudo systemctl enable --now gssproxy nfs-server
sudo exportfs -rav
cat /proc/net/rpc/use-gss-proxy # 1 = the kernel uses gssproxy
Step 8: Mount on client1
The client is joined (Step 3) and has the same idmapd.conf Domain. Its keytab contains CLIENT1$@AD.EXAMPLE.COM, which rpc.gssd tries first. rpc-gssd.service only starts when /etc/krb5.keytab exists, which the join takes care of:
sudo systemctl enable --now rpc-gssd
systemctl status rpc-gssd
sudo mkdir -p /mnt/secure
sudo mount -t nfs4 -o sec=krb5p nfs1.ad.example.com:/srv/nfs/secure /mnt/secure
Permanent mount in /etc/fstab:
nfs1.ad.example.com:/srv/nfs/secure /mnt/secure nfs4 sec=krb5p,_netdev 0 0
Always mount with the server’s FQDN (the name in the SPN). Do not use an IP address, and do not use a CNAME unless you added an SPN for it in Step 4.
Step 9: Test as an AD user
A user who logs in to client1 through SSSD (SSH or console) gets a Kerberos ticket automatically. To test from an existing session, get one by hand:
kinit alice@AD.EXAMPLE.COM
klist
cd /mnt/secure
touch alice-was-here
ls -l alice-was-here
After the first access, klist also shows a ticket for nfs/nfs1.ad.example.com@AD.EXAMPLE.COM. On the server, ls -l /srv/nfs/secure must show the file owned by alice (not nobody) and the group nfsusers. A user without a ticket is refused; root on the client acts as the client machine (CLIENT1$), and the server’s root_squash setting still applies.
Ticket cache. Check with klist which cache type your users have (KCM: when sssd-kcm is in use, KEYRING: or FILE: otherwise). I have not tested rpc.gssd with each type. If a user has a ticket but is still refused, try a FILE:/tmp/krb5cc_%{uid} cache as a test (default_ccache_name in [libdefaults]).
Verify
# both hosts
realm list
sudo adcli testjoin
id alice
nfsidmap -d
# server
sudo klist -ke /etc/krb5.keytab | grep nfs/
sudo exportfs -v
systemctl status gssproxy nfs-server
cat /proc/fs/nfsd/supported_krb5_enctypes
# client
nfsstat -m # shows sec=krb5p for the mount
klist # alice: krbtgt and nfs/nfs1.ad.example.com tickets
Machine password renewal keeps the nfs/ keys current
AD computer accounts change their password regularly, and each change is a key rotation. sssd-ad(5): SSSD checks once a day and renews the machine password when it is older than ad_maximum_machine_account_password_age (default 30 days). The default helper is realm, and the realmd daemon then runs adcli as root. adcli update writes the new keys for all SPNs in the keytab, including the nfs/ ones. It also keeps the previous key, because the new one takes time to replicate to all DCs (adcli man page). That is the same overlap you set up by hand in Rotate NFS Keytabs Safely, done automatically. The practical rules:
- Do not manage this keytab with
kadmin/ktadd; there is no MIT KDC. Useadcliorrealm renew. - To renew right away:
sudo realm reneworsudo adcli update --computer-password-lifetime=0(without it, adcli only changes passwords older than 30 days). - gssproxy read the rotated keytab without a restart in the MIT lab of the rotation post. The same should apply here, but it was not tested with AD.
- Never copy one keytab to another host or clone a joined VM; each host needs its own computer account.
Differences on EL9 (and EL8)
- The steps, file locations and options in this post are the same on RHEL 9, AlmaLinux 9, Rocky Linux 9 and Oracle Linux 9: realmd, adcli, SSSD with the AD provider, gssproxy for the NFS server and rpc.gssd for clients.
- RC4, if you really need it:
update-crypto-policies --set DEFAULT:AD-SUPPORT-LEGACYon EL9 and EL10. On EL8 the subpolicy that adds RC4 isAD-SUPPORT. Fix AD instead whenever you can. - Older versions of adcli may lack some options. Check
adcli update --helpfor--add-service-principalbefore scripting it.
Troubleshooting
Messages marked with * were not reproduced in the lab. They are the standard MIT Kerberos, realmd or coreutils texts.
| Message or symptom | Cause | Fix |
|---|---|---|
adcli: couldn't discover domain: ad.example.com | No SRV records found: the host does not use AD DNS, or the domain name is wrong | Point /etc/resolv.conf (NetworkManager) at the DCs; dig -t SRV _ldap._tcp.ad.example.com |
adcli: couldn't connect to ad.example.com domain: Couldn't find usable domain controller to connect to | DNS gives no reachable DC, or ports 389/88 are blocked | Check DNS and firewalls; adcli info -S dc1.ad.example.com ad.example.com to test one DC |
realm: Couldn’t join realm: Insufficient permissions to join the domain * | The join account may not create computer objects in that OU (or its quota is used up) | Use a delegated account, pre-create the computer object, or use another --computer-ou |
Clock skew too great * | More than 5 minutes between the host and the DC | Fix chrony; sync with the DCs |
kvno: Server nfs/nfs1.ad.example.com@AD.EXAMPLE.COM not found in Kerberos database * | The SPN does not exist on any account (Step 4 not done, or you mounted an alias) | adcli update --service-name=nfs; --add-service-principal for aliases; mount with the FQDN |
... kvno N not found in keytab; keytab is likely out of date * | The keytab is older than the AD account key, for example from a restored or copied keytab, or a password reset in AD | sudo adcli update --computer-password-lifetime=0; if the account was reset, realm leave and join again |
KDC has no support for encryption type * | No common enctype: the account has only RC4/DES keys, or msDS-supportedEncryptionTypes was changed | Enable AES on the account and re-run adcli update; only as a last resort AD-SUPPORT-LEGACY |
adcli update --service-name=nfs fails while writing SPNs | No right to write servicePrincipalName, or the SPN already belongs to another account | Run with an admin ticket (-C); setspn -Q nfs/nfs1.ad.example.com to find the owner |
id: ‘alice’: no such user | Fully qualified names are on (lab: id alice@ad.example.com worked, id alice did not) | Use alice@ad.example.com, or switch to short names (Step 2/6) |
Files owned by nobody | NFSv4 ID mapping: different Domain, or fully qualified names with the nsswitch plugin (lab results in Step 6) | Same Domain on all hosts; short names or Method = sss; nfsidmap -c |
| Different UIDs on server and client | SSSD ID mapping slices differ (hash collision, different range settings) or POSIX attributes on one side only | Same SSSD ID settings everywhere; ldap_idmap_default_domain_sid or POSIX attributes |
Kerberos mounts do nothing; rpc-gssd inactive with a condition message | No /etc/krb5.keytab on the client (ConditionPathExists) | Join the client; systemctl restart rpc-gssd |
User has a ticket but gets Permission denied | rpc.gssd cannot use the user’s ccache type, or the principal maps to the wrong user on the server | Check klist; run rpc.gssd -f -vvv in the foreground for detail; check Step 6 |
For mount hangs and errors that are not about Kerberos, the troubleshooting tables in the MIT Kerberos post apply unchanged.
Security notes
- Use
sec=krb5pwhen data crosses networks you do not fully control;krb5alone authenticates but sends file data in the clear. - The keytab is the server’s AD identity (
0600, root). Anyone who has it can act as the computer account in the domain. - Do not enable RC4 “just in case”. Do not mark the computer
--trusted-for-delegation; NFS does not need it. - Keep
root_squash, and restrict the export to your clients (*.ad.example.comor explicit names). - Restrict who may log in to the NFS server itself with
realm permit(or GPO-based access control withaccess_provider = ad).
What was tested and what was not
Tested with the AlmaLinux 10 packages, unprivileged on a test machine without AD: the option names of adcli join/update (--service-name, --add-service-principal, --remove-service-principal, -C/--login-ccache, --computer-password-lifetime) from the packaged adcli 0.9.3.1 and its man page; the adcli discovery and connection errors in the table; the realm sub-commands; realmd’s package list and fully-qualified-names/automatic-id-mapping settings (man page, distro config and realmd 0.17.1 source); adcli’s SPN handling on join and update (0.9.3.1 source); the libnfsidmap 2.8.3 nsswitch plugin with fully qualified and short user names, No-Strip and a wrong domain (outputs in Step 6); the Kerberos permitted_enctypes of DEFAULT, AD-SUPPORT and AD-SUPPORT-LEGACY from the AlmaLinux 10 crypto-policies generator; and the SSSD, idmapd.conf, sss_rpcidmapd, exports and rpc.gssd man page statements quoted here.
Not tested: a real join to Active Directory, so the actual realm discover output, the generated sssd.conf, adcli update against a DC and the keytab contents after it; SPN permissions in AD; a real kernel NFS export and mount with krb5p; gssproxy and rpc.gssd with AD tickets; ticket cache types with rpc.gssd; the sss idmap plugin and SSSD’s localauth plugin; automatic machine password renewal; SELinux and firewalld; and EL9. Treat those steps as a careful plan and test them on a test server before production.
Where to go next
With AD as the KDC, the NFS setup is the same as in Secure NFS with MIT Kerberos, and the machine password renewal takes care of the key rotation from Rotate NFS Keytabs Safely. Next steps are automounting home directories over krb5p, and giving batch jobs their own keytabs so they keep NFS access without a user ticket.
