Skip Navigation Links | |
Exit Print View | |
man pages section 1M: System Administration Commands Oracle Solaris 11.1 Information Library |
- import, export name service configurations
/usr/sbin/nscfg command [cmd_options] [operands]
/usr/sbin/nscfg import [-fnvq] FMRI]
/usr/sbin/nscfg export [-nvq] FMRI]
/usr/sbin/nscfg unconfig [-nvq] FMRI]
/usr/sbin/nscfg validate [-vq] FMRI]
/usr/sbin/nscfg help
The nscfg utility imports or exports legacy name service configuration files into or out of the SMF repository. Given a valid SMF configuration and corresponding FMRI, nscfg will regenerate the legacy naming service configuration files, such as nsswitch.conf, resolv.conf, nscd.conf, and so forth, into their legacy locations. Alternatively, nscfg can import those same configuration files populating the SMF repository if it is currently unpopulated.
The following are SMF services that can be operands to nscfg. In many instances, the legacy configuration file that is replaced by the SMF service is listed.
Legacy file: /etc/nsswitch.conf
Name service switch configuration (used by nscd).
Legacy file: /etc/nscd.conf
Name service cache (nscd).
Legacy file: /etc/resolv.conf
DNS naming service.
Legacy file: /etc/defaultdomain
Legacy file: /var/yp/binding/$DOMAIN/*
Shared NIS domain configuration. Used by all NIS services. Also (historical) shared use with LDAP naming services. Must be enabled when using nis/client or ldap/client.
NIS client naming service (ypbind and related)
Legacy file: /var/ldap/*
LDAP client naming service (ldap_cachemgr and related).
NIS server service (ypserv).
NIS server passwd service (rpc.yppasswd).
NIS server xfr service (ypxfrd)
NIS server update service (rpc.ypupdated)
Import legacy configuration files into SMF service.
Configuration for the following services is managed by location profiles:
svc:/system/name-service/switch:default svc:/network/dns/client:default svc:/network/nis/domain:default svc:/network/nis/client:default svc:/network/ldap/client:default
See netcfg(1M) for more information about location profiles.
These profiles are either fixed, meaning the network configuration is being managed in the traditional way, or reactive, meaning the network configuration is being managed automatically, reacting to changes in the network environment according to policy rules specified in the profiles.
When a fixed location (there can currently be only one, the DefaultFixed location) is active, changes made to the SMF repository, including those made by means of nscfg, will be applied to the location when it is disabled, and thus will be restored if that location is later re-enabled.
When a reactive location is active, changes should not be applied directly to the SMF repository; these changes will not be preserved in the location profile, and will thus be lost if the location is disabled, or if the system's network configuration, as managed by svc:/network/physical:default and svc:/network/location:default, is refreshed or restarted. Changes should instead be applied to the location itself, using the netcfg(1M) command; this will save the change to the location profile repository, and will also apply it to the SMF repository (if the change is made to the currently active location).
The nscfg utility supports the subcommands described below. Options are described in the context of the subcommands.
If none of the SMF repository properties for the specified FMRI are currently populated, import the legacy configuration files associated with the specified FMRI into the SMF repository.
With -f, force the repopulation of the SMF repository with the legacy configuration, even if currently populated.
With -v, issue verbose progress messages during the requested operation. With -q, issue no error or other messages during the requested operation.
Export the SMF configuration for the specified FMRI to legacy configuration files. This operation removes any existing affected legacy file(s) and generates new one(s) using the SMF configuration.
Unconfigure the SMF configuration for the specified FMRI. This operation resets the specified FMRI and any existing legacy file(s) to their initial unconfigured state.
With -v, issue verbose progress messages during the requested operation. With -q, issue no error or other messages during the requested operation.
Validate the SMF configuration for the specified FMRI. This operation checks the current configuration and verifies whether any errors exist.
With -v, issue verbose progress messages during the requested operation. With -q, issue no error or other messages during the requested operation.
Example 1 Importing DNS Client Configuration
The following command imports the DNS client configuration, stored in resolv.conf, into the SMF repository.
# nscfg import svc:/network/dns/client:default
Example 2 Exporting SMF LDAP Client Configuration
The following command exports the SMF LDAP client configuration to the legacy configuration files in /var/ldap.
# nscfg export svc:/network/ldap/client:default
Example 3 Resetting Name Service Switch Configuration
The following command resets the name service switch configuration to its initial unconfigured state. The command generates no output and exits quietly with status only.
# nscfg unconfig -q svc:/system/name-service/switch:default
Example 4 Validating LDAP Client Configuration
The following command validates the LDAP client configuration for errors or inconsistencies. The command generates no output and exits quietly with status only.
# nscfg validate -q svc:/network/ldap/client:default
Command successfully executed.
An error occurred.
Configuration unmodified, no change necessary.
No configuration to import.
/etc/default/{nss, yppasswd}
/etc/defaultdomain
/etc/nscd.conf
/etc/nsswitch.conf
/etc/resolv.conf
/var/ldap/ldap_client_cred
/var/ldap/ldap_client_file
/var/yp/binding/{nisdomainname}/ypservers
/var/yp/NISLDAPmapping
/var/yp/securenets
/var/yp/updaters
See attributes(5) for descriptions of the following attributes:
|
svcs(1), ldapclient(1M), netcfg(1M), nscd(1M), svcadm(1M), svccfg(1M), ypinit(1M), defaultdomain(4), nsswitch.conf(4), resolv.conf(4), ypfiles(4), attributes(5)