Dizwell Informatics

News from Nowhere

Change Domain Name on Solaris 11

Almost certainly, by default, the domain name for a freshly-built Solaris x86 server will be blank. That is, type the command domainname and only a blank line will be returned. Here’s how you set (or change) a domain name in Solaris 11 (all done as root):

svcadm disable nis/domain
svccfg -s svc:/network/nis/domain listprop config/domainname
svccfg -s svc:/network/nis/domain setprop config/domainname=dizwell.home
svccfg -s nis/domain:default refresh
svcadm enable nis/domain

That disables the naming service, lists the current domain name (which will not show much), sets a new domain name (in my case “dizwell.home”) and then refreshes and restarts the naming service. Confirm it has all worked with:


…and this time, you will get a more meaningful response.