Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man5/nsswitch.conf.5
Show All 27 Lines | |||||
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||||
.\" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | .\" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | ||||
.\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | .\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||||
.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd November 10, 2018 | .Dd September 6, 2020 | ||||
.Dt NSSWITCH.CONF 5 | .Dt NSSWITCH.CONF 5 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm nsswitch.conf | .Nm nsswitch.conf | ||||
.Nd name-service switch configuration file | .Nd name-service switch configuration file | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
▲ Show 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
The default criteria is to return on | The default criteria is to return on | ||||
.Dq success , | .Dq success , | ||||
and continue on anything else (i.e, | and continue on anything else (i.e, | ||||
.Li "[success=return notfound=continue unavail=continue tryagain=continue]" ) . | .Li "[success=return notfound=continue unavail=continue tryagain=continue]" ) . | ||||
.Ss Cache | .Ss Cache | ||||
You can enable caching for the particular database by specifying | You can enable caching for the particular database by specifying | ||||
.Dq cache | .Dq cache | ||||
as the first source in the | in the | ||||
.Nm | .Nm | ||||
file. | file. | ||||
It should come after | |||||
.Dq files , | |||||
but before remote sources like | |||||
.Dq nis . | |||||
You should also enable caching for this database in | You should also enable caching for this database in | ||||
.Xr nscd.conf 5 . | .Xr nscd.conf 5 . | ||||
If for the particular query | If for a particular query | ||||
.Dq cache | .Dq cache | ||||
source returns success, no further sources are queried. | source returns success, then no further sources are queried. | ||||
On the other hand, if there are no previously cached data, the | On the other hand, if there are no previously cached data, the | ||||
query result will be placed into the cache right after | query result will be placed into the cache right after | ||||
all other sources are processed. | all other sources are processed. | ||||
Note, that | Note that | ||||
.Dq cache | .Dq cache | ||||
requires | requires the | ||||
.Xr nscd 8 | .Xr nscd 8 | ||||
daemon to be running. | daemon to be running. | ||||
.Ss Compat mode: +/- syntax | .Ss Compat mode: +/- syntax | ||||
In historical multi-source implementations, the | In historical multi-source implementations, the | ||||
.Sq + | .Sq + | ||||
and | and | ||||
.Sq - | .Sq - | ||||
characters are used to specify the importing of user password and | characters are used to specify the importing of user password and | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
.Bl -tag -width /etc/nsswitch.conf -compact | .Bl -tag -width /etc/nsswitch.conf -compact | ||||
.It Pa /etc/nsswitch.conf | .It Pa /etc/nsswitch.conf | ||||
The file | The file | ||||
.Nm | .Nm | ||||
resides in | resides in | ||||
.Pa /etc . | .Pa /etc . | ||||
.El | .El | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
To lookup hosts in cache, then in | To lookup hosts in | ||||
.Pa /etc/hosts | .Pa /etc/hosts | ||||
, then in cache, | |||||
and then from the DNS, and lookup user information from | and then from the DNS, and lookup user information from | ||||
.Tn NIS | .Tn NIS | ||||
then files, use: | then files, use: | ||||
.Pp | .Pp | ||||
.Bl -tag -width passwd: -compact | .Bl -tag -width passwd: -compact | ||||
.It hosts: | .It hosts: | ||||
cache files dns | files cache dns | ||||
.It passwd: | .It passwd: | ||||
nis [notfound=return] files | nis [notfound=return] files | ||||
.It group: | .It group: | ||||
nis [notfound=return] files | nis [notfound=return] files | ||||
.El | .El | ||||
.Pp | .Pp | ||||
The criteria | The criteria | ||||
.Dq [notfound=return] | .Dq [notfound=return] | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |