Solaris Naming Setup and Configuration Guide

How to Change a Client's Domain Name

  1. Log in to the workstation and become superuser.

    The examples in this task use client1 as the workstation and as the new domain name.

    client1% su
  2. Change the workstation's domain name.

    Type the new name after the domainname command. Do not use a trailing dot. For example, to change a workstation's domain to the domain, you enter:

    client1# domainname

    If the workstation had been an NIS client, it may no longer be able to get NIS service.

  3. Verify the result.

    Run the domainname command again, this time without an argument, to display the server's current domain.

    client1# domainname
  4. Save the new domain name.

    Redirect the output of the domainname command into the /etc/defaultdomain file.

    client1# domainname > /etc/defaultdomain
  5. At a convenient time, reboot the workstation.

    Even after entering the new domain name into the /etc/defaultdomain file, some processes may still operate with the old domain name. To ensure that all processes are using the new domain name, reboot the workstation.

    Because you may be performing this task in a sequence of many other tasks, examine the work remaining to be done on the workstation before rebooting. Otherwise, you might find yourself rebooting several times instead of just once.

    Although restarting individual daemons, such as mountd may solve an NFS problem, it is strongly recommended that you reboot to synchronize configuration changes across daemons. This minimizes application failures caused by unknown changes to the configuration.