Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Importing Naming Services Configuration

The nscfg command transfers legacy file configuration for the name-service switch components into the SMF repository. When you upgrade to Oracle Solaris 11, the system's naming service configuration is automatically migrated to SMF. However, if necessary, you can manually migrate this configuration to SMF by using the nscfg command.

The following command imports the legacy file and then converts and pushes the configuration to SMF:

# /usr/sbin/nscfg import -f FMRI

Using the nscfg command is the simplest way to populate the DNS configuration with information from a previously existing resolv.conf file. In the following example, the nscfg command reads the information in the /etc/resolv.conf file, converts it, then stores the information in the svc:/network/dns/client SMF service:

# cp resolv.conf /etc/resolv.conf
# /usr/sbin/nscfg import -f dns/client
# svcadm enable dns/client

When you change a system's naming service, you need to also modify the name service switch information accordingly and possibly flush any stale information from the name service cache, as shown in the following example:

# cp /etc/nsswitch.dns /etc/nsswitch.conf
# /usr/sbin/nscfg import -f name-service/switch
# svcadm refresh name-service/switch
# svcadm refresh name-service/cache

For more information, see the nscfg (1M) man page.