]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/hosts.equiv.5
user_namespaces.7: ffix
[thirdparty/man-pages.git] / man5 / hosts.equiv.5
CommitLineData
fea681da 1.\" Copyright (c) 1995 Peter Tobias <tobias@et-inf.fho-emden.de>
2297bf0e 2.\"
fd0fc519 3.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
fea681da 4.\" This file may be distributed under the GNU General Public License.
fd0fc519 5.\" %%%LICENSE_END
5722c835 6.TH HOSTS.EQUIV 5 2015-07-23 "Linux" "Linux Programmer's Manual"
fea681da 7.SH NAME
a7af04ef 8hosts.equiv \- list of hosts and users that are granted "trusted"
c6fa0841
MK
9.B r
10command access to your system
fea681da 11.SH DESCRIPTION
23289769
MK
12The file
13.I /etc/hosts.equiv
14allows or denies hosts and users to use
c6fa0841
MK
15the \fBr\fP-commands (e.g.,
16.BR rlogin ,
12ccb8fc 17.BR rsh ,
c6fa0841
MK
18or
19.BR rcp )
20without
fea681da
MK
21supplying a password.
22.PP
23The file uses the following format:
24.TP
427cee53 25\fI+|[\-]hostname|+@netgroup|\-@netgroup\fP \fI[+|[\-]username|+@netgroup|\-@netgroup]\fP
fea681da 26.PP
c6fa0841
MK
27The
28.I hostname
29is the name of a host which is logically equivalent
c13182ef
MK
30to the local host.
31Users logged into that host are allowed to access
fea681da 32like-named user accounts on the local host without supplying a password.
c6fa0841
MK
33The
34.I hostname
35may be (optionally) preceded by a plus (+) sign.
bbc688df 36If the plus sign is used alone, it allows any host to access your system.
c6fa0841
MK
37You can explicitly deny access to a host by preceding the
38.I hostname
c13182ef 39by a minus (\-) sign.
427cee53
CD
40Users from that host must always supply additional credentials,
41including possibly a password. For security reasons you should always
42use the FQDN of the hostname and not the short hostname.
fea681da 43.PP
c6fa0841
MK
44The
45.I username
46entry grants a specific user access to all user
c13182ef
MK
47accounts (except root) without supplying a password.
48That means the
49user is NOT restricted to like-named accounts.
c6fa0841
MK
50The
51.I username
52may
c13182ef
MK
53be (optionally) preceded by a plus (+) sign.
54You can also explicitly
c6fa0841
MK
55deny access to a specific user by preceding the
56.I username
57with
c13182ef
MK
58a minus (\-) sign.
59This says that the user is not trusted no matter
fea681da
MK
60what other entries for that host exist.
61.PP
62Netgroups can be specified by preceding the netgroup by an @ sign.
63.PP
c13182ef
MK
64Be extremely careful when using the plus (+) sign.
65A simple typographical
66error could result in a standalone plus sign.
67A standalone plus sign is
fea681da
MK
68a wildcard character that means "any host"!
69.SH FILES
70.I /etc/hosts.equiv
71.SH NOTES
33a0ccb2 72Some systems will honor the contents of this file only when it has owner
c13182ef
MK
73root and no write permission for anybody else.
74Some exceptionally
fea681da
MK
75paranoid systems even require that there be no other hard links to the file.
76.PP
77Modern systems use the Pluggable Authentication Modules library (PAM).
33a0ccb2
MK
78With PAM a standalone plus sign is considered a wildcard
79character which means "any host" only when the word
fea681da
MK
80.I promiscuous
81is added to the auth component line in your PAM file for
82the particular service
75b94dc3 83.RB "(e.g., " rlogin ).
427cee53 84.SH EXAMPLE
9e7cff75 85Below are some example
427cee53
CD
86.I /etc/host.equiv
87or
88.I ~/.rhosts
9e7cff75
MK
89files.
90
e7fd5cc2 91Allow any user to log in from any host:
427cee53 92
9e7cff75
MK
93 +
94
95Allow any user from
96.I host
e7fd5cc2 97with a matching local account to log in:
9e7cff75
MK
98
99 host
100
101Note: the use of
102.I +host
103is never a valid syntax,
104including attempting to specify that any user from the host is allowed.
105
106Allow any user from
107.I host
e7fd5cc2 108to log in:
9e7cff75
MK
109
110 host +
111
112Note: this is distinct from the previous example
113since it does not require a matching local account.
114
115Allow
116.I user
117from
118.I host
ba5ed753 119to log in as any non-root user:
9e7cff75
MK
120
121 host user
122
123Allow all users with matching local accounts from
124.I host
e7fd5cc2 125to log in except for
9e7cff75
MK
126.IR baduser :
127
128 host \-baduser
129 host
130
131Deny all users from
132.IR host :
133
134 \-host
135
136Note: the use of
137.I "\-host\ \-user"
138is never a valid syntax,
139including attempting to specify that a particular user from the host
140is not trusted.
141
142Allow all users with matching local accounts on all hosts in a
143.IR netgroup :
144
145 +@netgroup
146
147Disallow all users on all hosts in a
148.IR netgroup :
149
150 \-@netgroup
151
152Allow all users in a
153.I netgroup
154to log in from
7065339f
MK
155.IR host
156as any non-root user:
9e7cff75
MK
157
158 host +@netgroup
159
160Allow all users with matching local accounts on all hosts in a
161.I netgroup
162except
163.IR baduser :
164
165 +@netgroup \-baduser
166 +@netgroup
427cee53 167
eb5367ad
MK
168Note: the deny statements must always precede the allow statements because
169the file is processed sequentially until the first matching rule is found.
47297adb 170.SH SEE ALSO
fea681da
MK
171.BR rhosts (5),
172.BR rlogind (8),
173.BR rshd (8)