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