System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

Changing a Machine's NIS Domain

To change the NIS domain name of a machine, do the following.

ProcedureHow to Change a Machine's NIS Domain Name

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Edit the machine's /etc/defaultdomain file, exchanging its present contents with the new domain name for the machine.

    For example, if the current domain name is, you might change it to

  3. Run domainname `cat /etc/defaultdomain'

  4. Re-initialize the machine as an NIS client, slave, or master server.

    For the details, see Chapter 5, Setting Up and Configuring NIS Service.