svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
nscfg(8)
System Administration Commands nscfg(8)
NAME
nscfg - import, export name service configurations
SYNOPSIS
/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
DESCRIPTION
The nscfg utility imports or exports legacy name service configuration
files into or out of the SMF repository. Given a valid SMF configura‐
tion 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.
svc:/system/name-service/switch:default
Legacy file: /etc/nsswitch.conf
Name service switch configuration (used by nscd).
svc:/system/name-service/cache:default
Legacy file: /etc/nscd.conf
Name service cache (nscd).
svc:/network/dns/client:default
Legacy file: /etc/resolv.conf
DNS naming service.
svc:/network/nis/domain:default
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.
svc:/network/nis/client:default
NIS client naming service (ypbind and related)
svc:/network/ldap/client:default
Legacy file: /var/ldap/*
LDAP client naming service (ldap_cachemgr and related).
svc:/network/nis/server:default
NIS server service (ypserv).
svc:/network/nis/passwd:default
NIS server passwd service (rpc.yppasswd).
svc:/network/nis/xfr:default
NIS server xfr service (ypxfrd)
svc:/network/nis/update:default
NIS server update service (rpc.ypupdated)
svc:/system/name-service/upgrade:default
Import legacy configuration files into SMF service.
SUB-COMMANDS
The nscfg utility supports the subcommands described below. Options are
described in the context of the subcommands.
import [-fvq] FMRI
If none of the SMF repository properties for the specified FMRI are
currently populated, import the legacy configuration files associ‐
ated 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 oper‐
ation. With -q, issue no error or other messages during the
requested operation.
export [-vq] FMRI
Export the SMF configuration for the specified FMRI to legacy con‐
figuration files. This operation removes any existing affected
legacy file(s) and generates new one(s) using the SMF configura‐
tion.
unconfig [-vq] FMRI
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 oper‐
ation. With -q, issue no error or other messages during the
requested operation.
validate [-vq] FMRI
Validate the SMF configuration for the specified FMRI. This opera‐
tion checks the current configuration and verifies whether any
errors exist.
With -v, issue verbose progress messages during the requested oper‐
ation. With -q, issue no error or other messages during the
requested operation.
EXAMPLES
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
EXIT STATUS
0
Command successfully executed.
1
An error occurred.
2
Configuration unmodified, no change necessary.
3
No configuration to import.
FILES
o /etc/default/{nss, yppasswd}
o /etc/defaultdomain
o /etc/nscd.conf
o /etc/nsswitch.conf
o /etc/resolv.conf
o /var/ldap/ldap_client_cred
o /var/ldap/ldap_client_file
o /var/yp/binding/{nisdomainname}/ypservers
o /var/yp/NISLDAPmapping
o /var/yp/securenets
o /var/yp/updaters
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityUncom‐
mitted
SEE ALSO
svcs(1), defaultdomain(5), nsswitch.conf(5), resolv.conf(5),
ypfiles(5), attributes(7), ldapclient(8), nscd(8), svcadm(8), svc‐
cfg(8), ypinit(8)
Oracle Solaris 11.4 24 Dec 2014 nscfg(8)