Solaris Naming Administration Guide

Modifying Server Preferences

You can change a server's preference number and switch (replace) the preference numbers assigned to different servers.

To change preferred servers or the preference number assigned to a server, run nisprefadm with the -m oldserver-=newserver(n) option.

How to Change a Server's Preference Number

    Run nisprefadm with the -m server=server(new) option.

#nisprefadm -L|-G -C name -m oldserver=newserver(n)


For example, on the deneb machine, to change the number given to the replica6.manf server to 2 in deneb's local client_info file:

deneb# nisprefadm -L -m replica6.manf=replica6.manf(2)

How to Replace One Server With Another in a Preference List

To change one server for another in a preference list:

    Run nisprefadm with the -m oldserver=newserver option.

#nisprefadm -L|-G -C name -m \


Keep in mind that when you replace a server in a global client_info table using the -G option, the replacement only applies to the subnet or machine identified by the -C option. Other listings of the replaced server are not affected.

For example, suppose you have a domain with three subnets, and the replica1 server is listed as a preferred server for two of those subnets. If replica1 is obsolete and you take it out of service, you then run nisprefadm -m to replace it with the new server for the first subnet. Until you do the same for the second subnet, replica1 is still listed as a preferred server for that subnet. The same principle applies to preferred servers for individual machines.

For example, to replace the replica3 server with the replica6 server for subnet in the domain's global client_info table and assign replica6 a preference number of 1:

nismaster# nisprefadm -G -C -m replica3 replica6(1)