Initial import from FreeBSD RELENG_4:
[dragonfly.git] / lib / libskey / skey.access.5
1 .\" $FreeBSD: src/lib/libskey/skey.access.5,v 1.5.2.1 2001/01/12 18:06:50 ru Exp $
2 .\"
3 .Dd January 12, 2001
4 .Dt SKEY.ACCESS 5
5 .Os
6 .Sh NAME
7 .Nm skey.access
8 .Nd "S/Key password control table"
9 .Sh DESCRIPTION
10 The S/Key password control table
11 .Pq Pa /etc/skey.access
12 is used by
13 .Nm login Ns \-like
14 programs to determine when
15 .Ux
16 passwords may be used
17 to access the system.
18 .Bl -bullet
19 .It
20 When the table does not exist, there are no password restrictions.
21 The user may enter the
22 .Ux
23 password or the S/Key one.
24 .It
25 When the table does exist,
26 .Ux
27 passwords are permitted only when
28 explicitly specified.
29 .It
30 For the sake of sanity,
31 .Ux
32 passwords are always permitted on the
33 systems console.
34 .El
35 .Sh TABLE FORMAT
36 The format of the table is one rule per line.
37 Rules are matched in order.
38 The search terminates when the first matching rule is found, or
39 when the end of the table is reached.
40 .Pp
41 Rules have the form:
42 .Pp
43 .Bl -item -offset indent -compact
44 .It
45 .Ic permit
46 .Ar condition condition ...
47 .It
48 .Ic deny
49 .Ar condition condition ...
50 .El
51 .Pp
52 where
53 .Ic permit
54 and
55 .Ic deny
56 may be followed by zero or more
57 .Ar conditions .
58 Comments begin with a
59 .Ql #
60 character, and extend through the end of the line.
61 Empty lines or
62 lines with only comments are ignored.
63 .Pp
64 A rule is matched when all conditions are satisfied.
65 A rule without
66 conditions is always satisfied.
67 For example, the last entry could
68 be a line with just the word
69 .Ic deny
70 on it.
71 .Sh CONDITIONS
72 .Bl -tag -width indent
73 .It Ic hostname Ar wzv.win.tue.nl
74 True when the login comes from host
75 .Ar wzv.win.tue.nl .
76 See the
77 .Sx WARNINGS
78 section below.
79 .It Ic internet Ar 131.155.210.0 255.255.255.0
80 True when the remote host has an internet address in network
81 .Ar 131.155.210 .
82 The general form of a net/mask rule is:
83 .Pp
84 .D1 Ic internet Ar net mask
85 .Pp
86 The expression is true when the host has an internet address for which
87 the bitwise and of
88 .Ar address
89 and
90 .Ar mask
91 equals
92 .Ar net .
93 See the
94 .Sx WARNINGS
95 section below.
96 .It Ic port Ar ttya
97 True when the login terminal is equal to
98 .Pa /dev/ttya .
99 Remember that
100 .Ux
101 passwords are always permitted with logins on the
102 system console.
103 .It Ic user Ar uucp
104 True when the user attempts to log in as
105 .Ar uucp .
106 .It Ic group Ar wheel
107 True when the user attempts to log in as a member of the
108 .Ar wheel
109 group.
110 .El
111 .Sh COMPATIBILITY
112 For the sake of backwards compatibility, the
113 .Ic internet
114 keyword may be omitted from net/mask patterns.
115 .Sh WARNINGS
116 When the S/Key control table
117 .Pq Pa /etc/skey.access
118 exists, users without S/Key passwords will be able to login only
119 where its rules allow the use of
120 .Ux
121 passwords.
122 In particular, this
123 means that an invocation of
124 .Xr login 1
125 in a pseudo-tty (e.g. from
126 within
127 .Xr xterm 1
128 or
129 .Xr screen 1
130 will be treated as a login
131 that is neither from the console nor from the network, mandating the use
132 of an S/Key password.
133 Such an invocation of
134 .Xr login 1
135 will necessarily
136 fail for those users who do not have an S/Key password.
137 .Pp
138 Several rule types depend on host name or address information obtained
139 through the network.
140 What follows is a list of conceivable attacks to force the system to permit
141 .Ux
142 passwords.
143 .Ss "Host address spoofing (source routing)"
144 An intruder configures a local interface to an address in a trusted
145 network and connects to the victim using that source address.
146 Given
147 the wrong client address, the victim draws the wrong conclusion from
148 rules based on host addresses or from rules based on host names derived
149 from addresses.
150 .Pp
151 Remedies:
152 .Bl -enum
153 .It
154 do not permit
155 .Ux
156 passwords with network logins;
157 .It
158 use network software that discards source routing information (e.g.\&
159 a tcp wrapper).
160 .El
161 .Pp
162 Almost every network server must look up the client host name using the
163 client network address.
164 The next obvious attack therefore is:
165 .Ss "Host name spoofing (bad PTR record)"
166 An intruder manipulates the name server system so that the client
167 network address resolves to the name of a trusted host.
168 Given the
169 wrong host name, the victim draws the wrong conclusion from rules based
170 on host names, or from rules based on addresses derived from host
171 names.
172 .Pp
173 Remedies:
174 .Bl -enum
175 .It
176 do not permit
177 .Ux
178 passwords with network logins;
179 .It
180 use
181 network software that verifies that the hostname resolves to the client
182 network address (e.g. a tcp wrapper).
183 .El
184 .Pp
185 Some applications, such as the
186 .Ux
187 .Xr login 1
188 program, must look up the
189 client network address using the client host name.
190 In addition to the
191 previous two attacks, this opens up yet another possibility:
192 .Ss "Host address spoofing (extra A record)"
193 An intruder manipulates the name server system so that the client host
194 name (also) resolves to a trusted address.
195 .Pp
196 Remedies:
197 .Bl -enum
198 .It
199 do not permit
200 .Ux
201 passwords with network logins;
202 .It
203 the
204 .Fn skeyaccess
205 routines ignore network addresses that appear to
206 belong to someone else.
207 .El
208 .Sh DIAGNOSTICS
209 Syntax errors are reported to the
210 .Xr syslogd 8 .
211 When an error is found
212 the rule is skipped.
213 .Sh FILES
214 .Bl -tag -width /etc/skey.access
215 .It Pa /etc/skey.access
216 password control table
217 .El
218 .Sh SEE ALSO
219 .Xr login 1 ,
220 .Xr syslogd 8
221 .Sh AUTHORS
222 .An Wietse Venema ,
223 Eindhoven University of Technology,
224 The Netherlands.