Skip to main content

vserver services name-service ns-switch create

Contributors
Suggest changes

Create a new Name Service Switch table entry

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The vserver services name-service ns-switch create command specifies the order in which to lookup the name service sources, for a given Vserver and name service database. Each name service database contains some information regarding hosts, group, password, netgroup or namemap. Such a database comes from one or more name service sources such as files, DNS, LDAP or NIS.

Note: The ` vserver services name-service ns-switch ` command provides the functionality of the /etc/nsswitch.conf file on UNIX systems. For more information, see the UNIX man page for nsswitch.conf(5).

Parameters

-vserver <vserver name> - Vserver

Use this parameter to specify the Vserver on which to create the new name service switch entry

-database {hosts|group|passwd|netgroup|namemap} - Name Service Switch Database

Name Service Switch Database Use this parameter to specify the name service database for which the order of the source lookup is being specified. This parameter can have the following values:

  • hosts

  • group

  • passwd

  • netgroup

  • namemap

-sources {files|dns|ldap|nis} - Name Service Source Order

Name Service Source Order Use this parameter to specify the name service sources and the order in which to look them up for the specified Vserver and name service database. Each name service source in the list for this parameter must be one of the following:

  • files

  • dns

  • ldap

  • nis

Separate multiple name service sources with commas.

For each database specified with the -database parameter, one or more sources must be specified. The valid sources for each database type are shown in the following table:

		    +----------+-------------------+
		    | Database |  Valid Sources    |
		    |----------+-------------------|
		    | hosts    |  files, dns       |
        	    | group    |  files, nis, ldap |
		    | passwd   |  files, nis, ldap |
        	    | netgroup |  files, nis, ldap |
		    | namemap  |  files, ldap      |
		    +----------+-------------------+

+
NOTE: If "files" is not specified as the default source for the "passwd" or "group" database, ensure that default user and group entries for the 'passwd' and 'group' respectively are present in the source configured. Default entries for "passwd" database: nobody, pcuser, root, sshd, toor, daemon, operator, bin, tty, kmem, games, news, man, smmsp, mailnull, bind, proxy, uucp, pop, www, admin, diag, autosupport. Default entries for "group" database: wheel, daemon, kmem, sys, tty, operator, mail, bin, news, man, games, ftp, staff, sshd, smmsp, mailnull, guest, bind, proxy, authpf, _pflogd, _dhcp, uucp, dialer, network, audit, www, antivirus, nogroup, nobody.

+

Examples

The following example creates name service source ordering for the hosts database on a Vserver named vs0. The order of looking up the sources is specified as files followed by DNS.

cluster1::> vserver services name-service ns-switch create -vserver vs0 -database hosts -sources files,dns

The following example creates the name service source ordering for the passwd database on a Vserver named vs1. The order of looking up the sources is specified as files, NIS and LDAP.

cluster1::> vserver services nameservice ns-switch create -vserver vs1 -database passwd -sources files,nis,ldap