Most operating systems make certain assumptions about environments in order to make configuring them “easier.” Those assumptions are usually based on what the majority of users need or on what the industry thinks your environment should look like. The NFSv4 domain name in Solaris is a good example of one of those assumptions that is often not in line with the environment I’m configuring.
The “correct” way to set the NFS domain is to use the sharectl(8) command:
root@server:~# sharectl set -p nfsmapid_domain=company.com nfs
root@server:~# However, what if you’re behind firewalls or for some other reason don’t want to use an FQDN? sharectl won’t let you do it:
root@server:~# sharectl set -p nfsmapid_domain=company nfs
Could not set property nfsmapid_domain: invalid property value
root@server:~# Well that’s annoying, isn’t it? What to do? There are several ways to approach this problem. One way that is mentioned often in Oracle’s documentation and in forum posts is to add/edit the nfsmapid_domain property in SMF. What that documentation and those forum posts usually don’t include, however, is to which service you should add that property.
For Solaris 11.3 and 11.4, you add the property to mapid:default like so:
root@server:~# svccfg -s nfs/mapid:default
svc:/network/nfs/mapid:default> setprop nfs-props/nfsmapid_domain=astring: company
svc:/network/nfs/mapid:default> refresh
svc:/network/nfs/mapid:default> exit
And just like that, the domain is changed!
root@server:~# cat /var/run/nfs4_domain
company
root@server:~#