Skip to main content

vserver services name-service ns-switch modify

Contributors
Suggest changes

Change a Name Service Switch table entry

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

Description

Use the ` vserver services name-service ns-switch modify ` command to modify the order of looking up the name service sources, for an existing name service switch entry.

Parameters

-vserver <vserver name> - Vserver

Vserver Use this parameter to specify the Vserver on which to modify the name service switch entry. A data Vserver or admin Vserver can be specified.

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

Name Service Switch Database Use this parameter to specify the name service database, of the given Vserver,for which to modify the name service switch entry. Following are the possible values for this parameter:

  • 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 whichlook 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 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 modifies the name service source ordering for the hosts database on a Vserver named vs0. The order of looking up the sources is changed to only DNS.

cluster1::> vserver services name-service ns-switch modify -vserver vs0 -database hosts -sources dns

The following example modifies the name service source ordering for the passwd database on a Vserver named vs1. The order of looking up the sources is changed to LDAP followed by NIS.

cluster1::> vserver services name-service ns-switch modify -vserver vs1 -database passwd -sources ldap,nis