xref: /freebsd/share/man/man5/services.5 (revision 702766d09a37534298676092712864151ab308bd)
1*702766d0SAlexander Ziaee.\"-
2*702766d0SAlexander Ziaee.\" SPDX-License-Identifier: BSD-3-Clause
3*702766d0SAlexander Ziaee.\"
4afe61c15SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993
5afe61c15SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
6afe61c15SRodney W. Grimes.\"
7afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
8afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions
9afe61c15SRodney W. Grimes.\" are met:
10afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
11afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
12afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
13afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
14afe61c15SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
15dda5b397SEitan Adler.\" 3. Neither the name of the University nor the names of its contributors
16afe61c15SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
17afe61c15SRodney W. Grimes.\"    without specific prior written permission.
18afe61c15SRodney W. Grimes.\"
19afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22afe61c15SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29afe61c15SRodney W. Grimes.\" SUCH DAMAGE.
30afe61c15SRodney W. Grimes.\"
31*702766d0SAlexander Ziaee.Dd April 29, 2024
32afe61c15SRodney W. Grimes.Dt SERVICES 5
333d45e180SRuslan Ermilov.Os
34afe61c15SRodney W. Grimes.Sh NAME
35afe61c15SRodney W. Grimes.Nm services
36*702766d0SAlexander Ziaee.Nd internet service name and port number data base
37afe61c15SRodney W. Grimes.Sh DESCRIPTION
38afe61c15SRodney W. GrimesThe
394b66483fSRuslan Ermilov.Nm
40afe61c15SRodney W. Grimesfile contains information regarding
41afe61c15SRodney W. Grimesthe known services available in the
42afe61c15SRodney W. GrimesInternet.
43afe61c15SRodney W. GrimesFor each service a single line should be present
44afe61c15SRodney W. Grimeswith the following information:
45afe61c15SRodney W. Grimes.Bd -unfilled -offset indent
46afe61c15SRodney W. Grimesofficial service name
47afe61c15SRodney W. Grimesport number
48afe61c15SRodney W. Grimesprotocol name
49afe61c15SRodney W. Grimesaliases
50afe61c15SRodney W. Grimes.Ed
51afe61c15SRodney W. Grimes.Pp
52735a59b4SSheldon HearnItems are separated by any number of blanks and/or tab characters.
53735a59b4SSheldon HearnThe port number and protocol name are considered a single
54afe61c15SRodney W. Grimes.Em item ;
55afe61c15SRodney W. Grimesa ``/'' is used to
565203edcdSRuslan Ermilovseparate the port and protocol (e.g.\& ``512/tcp'').
57afe61c15SRodney W. GrimesA ``#'' indicates the beginning of
58afe61c15SRodney W. Grimesa comment; subsequent characters up to the end of the line are
59afe61c15SRodney W. Grimesnot interpreted by the routines which search the file.
60afe61c15SRodney W. Grimes.Pp
61afe61c15SRodney W. GrimesService names may contain any printable
62afe61c15SRodney W. Grimescharacter other than a field delimiter, newline,
63afe61c15SRodney W. Grimesor comment character.
64e622b479SHajimu UMEMOTO.Pp
65e622b479SHajimu UMEMOTOIf
66e622b479SHajimu UMEMOTO.Dq db
67e622b479SHajimu UMEMOTOis specified as source in the
68e622b479SHajimu UMEMOTO.Xr nsswitch.conf 5 ,
69e622b479SHajimu UMEMOTO.Pa /var/db/services.db
70e622b479SHajimu UMEMOTOis searched.
71e622b479SHajimu UMEMOTOThe database in
72e622b479SHajimu UMEMOTO.Pa /var/db/services.db
73e622b479SHajimu UMEMOTOneeds to be updated with
74e622b479SHajimu UMEMOTO.Xr services_mkdb 8
75e622b479SHajimu UMEMOTOafter changes to the services file have been applied.
76d38ba48dSBill Paul.Sh NIS INTERACTION
77d38ba48dSBill PaulAccess to the NIS
78d38ba48dSBill Paul.Pa services.byname
79d38ba48dSBill Paulmap can be enabled by adding a single ``+'' on a line by itself
80d38ba48dSBill Paulin the
81d38ba48dSBill Paul.Pa /etc/services
82735a59b4SSheldon Hearnfile.
83735a59b4SSheldon HearnThis causes the contents of the NIS services map to be inserted
84d38ba48dSBill Paulat the location where the ``+'' appears.
85afe61c15SRodney W. Grimes.Sh FILES
86afe61c15SRodney W. Grimes.Bl -tag -width /etc/services -compact
87afe61c15SRodney W. Grimes.It Pa /etc/services
88afe61c15SRodney W. GrimesThe
894b66483fSRuslan Ermilov.Nm
90afe61c15SRodney W. Grimesfile resides in
91afe61c15SRodney W. Grimes.Pa /etc .
92afe61c15SRodney W. Grimes.El
93afe61c15SRodney W. Grimes.Sh SEE ALSO
9467304db7SChristian Brueffer.Xr getservent 3 ,
9567304db7SChristian Brueffer.Xr nsswitch.conf 5 ,
96e622b479SHajimu UMEMOTO.Xr services_mkdb 8
97afe61c15SRodney W. Grimes.Sh HISTORY
98afe61c15SRodney W. GrimesThe
99afe61c15SRodney W. Grimes.Nm
100afe61c15SRodney W. Grimesfile format appeared in
101afe61c15SRodney W. Grimes.Bx 4.2 .
1029cbda590SRuslan Ermilov.Sh BUGS
1039cbda590SRuslan ErmilovA name server should be used instead of a static file.
104