Differences between revisions 2 and 3
Revision 2 as of 2023-06-22 20:38:42
Size: 1445
Comment:
Revision 3 as of 2023-06-22 20:38:50
Size: 1475
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from BSD/nsswitch.conf
= nsswitch.conf =
= NsSwitch.Conf =
Line 4: Line 3:
A description of the '''Name Service Switch''' ('''NSS''') file (`/etc/nsswitch.conf`). For more details, see `nsswitch.conf(5)`. The '''Name Service Switch configuration file''' (or '''`nsswitch.conf(5)`'''), typically found at `/etc/nsswitch.conf`, declares how domain names should be translated into [[Protocols/IP|IP addresses]].

NsSwitch.Conf

The Name Service Switch configuration file (or nsswitch.conf(5)), typically found at /etc/nsswitch.conf, declares how domain names should be translated into IP addresses.


Example

The defaults, which would be observed if /etc/nsswitch.conf were missing, are:

group            compat
group_compat     nis
hosts            files dns
networks         files
passwd           compat
passwd_compat    nis
shells           files
services         compat
services_compat  nis
rpc              files
proto            files
netgroup         files


Syntax

Databases

The first column (delimited by spaces) indicates a database, while every subsequent column is a source or criteria.

Criteria

Criteria are structured as [STATUS=ACTION] or [!STATUS=ACTION].

A status can be any of...

  • success meaning 'no error'.

  • notfound meaning 'error in lookup'.

  • unavail indicates a connection couldn't be made.

  • tryagain indicates 'temporarily unavailability', as with locked connections.

An action is one of...

  • return meaning 'return the result'

  • continue meaning 'try the next item'

The implicit default is that a source only results in a return action given a success status. Anything else will result in a continue.


CategoryRicottone

BSD/NsSwitchConf (last edited 2023-06-22 20:39:00 by DominicRicottone)