Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.4

Exit Print View

Updated: February 2022
 
 

Importing Naming Services Configuration

You can use the nscfg command to transfer legacy file configuration for the name-service switch components to the SMF repository.

The following command imports any 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 must also modify the name service switch information accordingly and remove 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

See the nscfg(8) man page.