Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / kerberosIV / doc / problems.texi
1 @node Resolving frequent problems, Acknowledgments, One-Time Passwords, Top
2 @chapter Resolving frequent problems
3
4 @menu
5 * Problems compiling Kerberos::  
6 * Problems with firewalls::     
7 * Common error messages::       
8 * Is Kerberos year 2000 safe?::  
9 @end menu
10
11 @node Problems compiling Kerberos, Problems with firewalls, Resolving frequent problems, Resolving frequent problems
12 @section Problems compiling Kerberos
13
14 Many compilers require a switch to become ANSI compliant. Since krb4
15 is written in ANSI C it is necessary to specify the name of the compiler
16 to be used and the required switch to make it ANSI compliant. This is
17 most easily done when running configure using the @kbd{env} command. For
18 instance to build under HP-UX using the native compiler do:
19
20 @cartouche
21 @example
22 datan$ env CC="cc -Ae" ./configure
23 @end example
24 @end cartouche
25
26 @cindex GCC
27 In general @kbd{gcc} works. The following combinations have also been
28 verified to successfully compile the distribution:
29
30 @table @asis
31
32 @item @samp{HP-UX}
33 @kbd{cc -Ae}
34 @item @samp{Digital UNIX}
35 @kbd{cc -std1}
36 @item @samp{AIX}
37 @kbd{xlc}
38 @item @samp{Solaris 2.x}
39 @kbd{cc} (unbundled one)
40 @item @samp{IRIX}
41 @kbd{cc}
42
43 @end table
44
45 @subheading Linux problems
46
47 The libc functions gethostby*() under RedHat4.2 can sometimes cause
48 core dumps. If you experience these problems make sure that the file
49 @file{/etc/nsswitch.conf} contains a hosts entry no more complex than
50 the line
51
52 @cartouche
53 hosts: files dns
54 @end cartouche
55
56 Some systems have lost @file{/usr/include/ndbm.h} which is necessary to
57 build krb4 correctly. There is a @file{ndbm.h.Linux} right next to
58 the source distribution.
59
60 @cindex Linux
61 There has been reports of non-working @file{libdb} on some Linux
62 distributions.  If that happens, use the @kbd{--without-berkeley-db}
63 when configuring.
64
65 @subheading SunOS 5 (aka Solaris 2) problems
66
67 @cindex SunOS 5
68
69 When building shared libraries and using some combinations of GNU gcc/ld
70 you better set the environment variable RUN_PATH to /usr/athena/lib
71 (your target libdir). If you don't, then you will have to set
72 LD_LIBRARY_PATH during runtime and the PAM module will not work.
73
74 @subheading HP-UX problems
75
76 @cindex HP-UX
77 The shared library @file{/usr/lib/libndbm.sl} doesn't exist on all
78 systems.  To make problems even worse, there is never an archive version
79 for static linking either. Therefore, when building ``truly portable''
80 binaries first install GNU gdbm or Berkeley DB, and make sure that you
81 are linking against that library.
82
83 @subheading Cray problems
84
85 @kbd{rlogind} won't work on Crays until @code{forkpty()} has been
86 ported, in the mean time use @kbd{telnetd}.
87
88 @subheading IRIX problems
89
90 @cindex IRIX
91
92 IRIX has three different ABI:s (Application Binary Interface), there's
93 an old 32 bit interface (known as O32, or just 32), a new 32 bit
94 interface (N32), and a 64 bit interface (64). O32 and N32 are both 32
95 bits, but they have different calling conventions, and alignment
96 constraints, and similar. The N32 format is the default format from IRIX
97 6.4.
98
99 You select ABI at compile time, and you can do this with the
100 @samp{--with-mips-abi} configure option. The valid arguments are
101 @samp{o32}, @samp{n32}, and @samp{64}, N32 is the default. Libraries for
102 the three different ABI:s are normally installed installed in different
103 directories (@samp{lib}, @samp{lib32}, and @samp{lib64}). If you want
104 more than one set of libraries you have to reconfigure and recompile for
105 each ABI, but you should probably install only N32 binaries.
106
107 @cindex GCC
108 GCC had had some known problems with the different ABI:s. Old GCC could
109 only handle O32, newer GCC can handle N32, and 64, but not O32, but in
110 some versions of GCC the structure alignment was broken in N32.
111
112 This confusion with different ABI:s can cause some trouble. For
113 instance, the @file{afskauthlib.so} library has to use the same ABI as
114 @file{xdm}, and @file{login}. The easiest way to check what ABI to use
115 is to run @samp{file} on @file{/usr/bin/X11/xdm}.
116
117 @cindex AFS
118 Another problem that you might encounter if you run AFS is that Transarc
119 apparently doesn't support the 64-bit ABI, and because of this you can't
120 get tokens with a 64 bit application. If you really need to do this,
121 there is a kernel module that provides this functionality at
122 @url{ftp://ftp.pdc.kth.se/home/joda/irix-afs64.tar.gz}.
123
124 @subheading AIX problems
125
126 @cindex GCC
127 @kbd{gcc} version 2.7.2.* has a bug which makes it miscompile
128 @file{appl/telnet/telnetd/sys_term.c} (and possibily
129 @file{appl/bsd/forkpty.c}), if used with too much optimization.
130
131 Some versions of the @kbd{xlc} preprocessor doesn't recognise the
132 (undocumented) @samp{-qnolm} option. If this option is passed to the
133 preprocessor (like via the configuration file @file{/etc/ibmcxx.cfg},
134 configure will fail.
135
136 The solution is to remove this option from the configuration file,
137 either globally, or for just the preprocessor:
138
139 @example
140 $ cp /etc/ibmcxx.cfg /tmp
141 $ed /tmp/ibmcxx.cfg
142 8328
143 /nolm
144         options   = -D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_IBMR2,-D_POWER,-bpT:0x10000000,-bpD:0x20000000,-qnolm
145 s/,-qnolm//p 
146         options   = -D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_IBMR2,-D_POWER,-bpT:0x10000000,-bpD:0x20000000
147 w
148 8321
149 q
150 $ env CC=xlc CPP="xlc -E -F/tmp/ibmcxx.cfg" configure
151 @end example
152
153 There is a bug in AFS 3.4 version 5.38 for AIX 4.3 that causes the
154 kernel to panic in some cases. There is a hack for this in @kbd{login},
155 but other programs could be affected also. This seems to be fixed in
156 version 5.55.
157
158 @subheading C2 problems
159
160 @cindex C2
161 The programs that checks passwords works with @file{passwd}, OTP, and
162 Kerberos paswords. This is problem if you use C2 security (or use some
163 other password database), that normally keeps passwords in some obscure
164 place. If you want to use Kerberos with C2 security you will have to
165 think about what kind of changes are necessary. See also the discussion
166 about Digital's SIA and C2 security, see @ref{Digital SIA}.
167
168 @node Problems with firewalls, Common error messages, Problems compiling Kerberos, Resolving frequent problems
169 @section Problems with firewalls
170
171 @cindex firewall
172 A firewall is a network device that filters out certain types of packets
173 going from one side of the firewall to the other. A firewall is supposed
174 to solve the same kinds of problems as Kerberos (basically hindering
175 unauthorised network use). The difference is that Kerberos tries to
176 authenticate users, while firewall splits the network in a `secure'
177 inside, and an `insecure' outside. 
178
179 Firewall people usually think that UDP is insecure, partly because many
180 `insecure' protocols use UDP. Since Kerberos by default uses UDP to send
181 and recieve packets, Kerberos and firewalls doesn't work very well
182 together.
183
184 The symptoms of trying to use Kerberos behind a firewall is that you
185 can't get any tickets (@code{kinit} exits with the infamous @samp{Can't
186 send request} error message).
187
188 There are a few ways to solve these problems:
189
190 @itemize @bullet
191 @item 
192 Convince your firewall administrator to open UDP port 750 or 88 for
193 incoming packets. This usually turns out to be difficult.
194 @item 
195 Convince your firewall administrator to open TCP port 750 or 88 for
196 outgoing connections. This can be a lot easier, and might already be
197 enabled.
198 @item 
199 Use TCP connections over some non-standard port. This requires that you
200 have to convince the administrator of the kerberos server to allow
201 connections on this port.
202 @item 
203 @cindex HTTP
204 Use HTTP to get tickets. Since web-stuff has become almost infinitely
205 popular, many firewalls either has the HTTP port open, or has a HTTP
206 proxy.
207 @end itemize
208
209 The last two methods might be considered to be offensive (since you are
210 not sending the `right' type of data in each port). You probably do best
211 in discussuing this with firewall administrator.
212
213 For information on how to use other protocols when communication with
214 KDC, see @ref{Install the configuration files}.
215
216 It is often the case that the firewall hides addresses on the `inside',
217 so it looks like all packets are coming from the firewall. Since address
218 of the client host is encoded in the ticket, this can cause trouble. If
219 you get errors like @samp{Incorrect network address}, when trying to use
220 the ticket, the problem is usually becuase the server you are trying to
221 talk to sees a different address than the KDC did. If you experience
222 this kind of trouble, the easiest way to solve them is probably to try
223 some other mechanism to fetch tickets. You might also be able to
224 convince the administrator of the server that the two different
225 addresses should be added to the @file{/etc/krb.equiv} file.
226
227 @node Common error messages, Is Kerberos year 2000 safe?, Problems with firewalls, Resolving frequent problems
228 @section Common error messages
229
230 These are some of the more obscure error messages you might encounter:
231
232 @table @asis
233
234 @item @samp{Time is out of bounds}
235
236 The time on your machine differs from the time on either the kerberos
237 server or the machine you are trying to login to. If it isn't obvious
238 that this is the case, remember that all times are compared in UTC.
239
240 On unix systems you usually can find out what the local time is by doing
241 @code{telnet machine daytime}. This time (again, usually is the keyword)
242 is with correction for time-zone and daylight savings.
243
244 If you have problem keeping your clocks synchronized, consider using a
245 time keeping system such as NTP (see also the discussion in
246 @ref{Install the client programs}).
247
248 @item @samp{Ticket issue date too far in the future}
249
250 The time on the kerberos server is more than five minutes ahead of the
251 time on the server.
252
253 @item @samp{Can't decode authenticator}
254
255 This means that there is a mismatch between the service key in the
256 kerberos server and the service key file on the specific machine.
257 Either:
258 @itemize @bullet
259 @item
260 the server couldn't find a service key matching the request
261 @item
262 the service key (or version number) does not match the key the packet
263 was encrypted with
264 @end itemize
265
266 @item @samp{Incorrect network address}
267
268 The address in the ticket does not match the address you sent the
269 request from. This happens on systems with more than one network
270 address, either physically or logically. You can list addresses which
271 should be considered equal in @file{/etc/krb.equiv} on your servers. 
272
273 A note to programmers: a server should not pass @samp{*} as the instance
274 to @samp{krb_rd_req}. It should try to figure out on which interface the
275 request was received, for instance by using @samp{k_getsockinst}.
276
277 If you change addresses on your computer you invalidate any tickets you
278 might have. The easiest way to fix this is to get new tickets with the
279 new address.
280
281 @item @samp{Message integrity error}
282
283 The packet is broken in some way:
284 @itemize @bullet
285 @item
286 the lengths does not match the size of the packet, or
287 @item
288 the checksum does not match the contents of the packet
289 @end itemize
290
291 @item @samp{Can't send request}
292 There is some problem contacting the kerberos server. Either the server
293 is down, or it is using the wrong port (compare the entries for
294 @samp{kerberos-iv} in @file{/etc/services}). The client might also have
295 failed to guess what kerberos server to talk to (check
296 @file{/etc/krb.conf} and @file{/etc/krb.realms}).
297
298 One reason you can't contact the kerberos server might be because you're
299 behind a firewall that doesn't allow kerberos packets to pass. For
300 possible solutions to this see the firewall section above.
301
302 @item @samp{kerberos: socket: Unable to open socket...}
303
304 The kerberos server has to open four sockets for each interface.  If you
305 have a machine with lots of virtual interfaces, you run the risk of
306 running out of file descriptors.  If that happens you will get this
307 error message.
308
309 @item @samp{ftp: User foo access denied}
310
311 This usually happens because the user's shell is not listed in
312 @file{/etc/shells}.  Note that @kbd{ftpd} checks this file even on
313 systems where the system version does not and there is no
314 @file{/etc/shells}.
315
316 @item @samp{Generic kerberos error}
317 This is a generic catch-all error message.
318
319 @end table
320
321 @node Is Kerberos year 2000 safe?,  , Common error messages, Resolving frequent problems
322 @section Is Kerberos year 2000 safe?
323
324 @cindex Year 2000
325
326 Yes.
327
328 A somewhat longer answer is that we can't think of anything that can
329 break. The protocol itself doesn't use time stamps in textual form, the
330 two-digit year problems in the original MIT code has been fixed (this
331 was a problem mostly with log files). The FTP client had a bug in the
332 command `newer' (which fetches a file if it's newer than what you
333 already got).
334
335 Another thing to look out for, but that isn't a Y2K problem per se, is
336 the expiration date of old principals. The MIT code set the default
337 expiration date for some new principals to 1999-12-31, so you might want
338 to check your database for things like this.
339
340 Now, the Y2038 problem is something completely different (but the
341 authors should have retired by then, presumably growing rowanberrys in
342 some nice and warm place).