source: postlfs/security/mitkrb.xml@ 90e2fb4e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 90e2fb4e was 90e2fb4e, checked in by Randy McMurchy <randy@…>, 19 years ago

Added md5sums to MIT krb5, Heimdal, Cyrus SASL and Stunnel instructions; fixed MIT krb5 download URL

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3395 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY mitkrb-download-http "http://web.mit.edu/kerberos/www/dist/krb5/1.3/krb5-&mitkrb-version;-signed.tar">
8 <!ENTITY mitkrb-download-ftp " ">
9 <!ENTITY mitkrb-md5sum "18d5a6a8e1cce120536718d39a052a87">
10 <!ENTITY mitkrb-size "6.3 MB">
11 <!ENTITY mitkrb-buildsize "64 MB">
12 <!ENTITY mitkrb-time "2.55 SBU">
13]>
14
15<sect1 id="mitkrb" xreflabel="MIT krb5-&mitkrb-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="mitkrb.html"?>
21<title><acronym>MIT</acronym> krb5-&mitkrb-version;</title>
22<indexterm zone="mitkrb">
23<primary sortas="a-Kerberos-MIT">Kerberos5(MIT)</primary></indexterm>
24
25<sect2>
26<title>Introduction to <application><acronym>MIT</acronym>
27krb5</application></title>
28
29<para>
30<application><acronym>MIT</acronym> krb5</application> is a free
31implementation of Kerberos 5. Kerberos is a network authentication
32protocol. It centralizes the authentication database and uses kerberized
33applications to work with servers or services that support Kerberos
34allowing single logins and encrypted communication over internal
35networks or the Internet.
36</para>
37
38<sect3><title>Package information</title>
39<itemizedlist spacing='compact'>
40<listitem><para>Download (HTTP):
41<ulink url="&mitkrb-download-http;"/></para></listitem>
42<listitem><para>Download (FTP):
43<ulink url="&mitkrb-download-ftp;"/></para></listitem>
44<listitem><para>Download MD5 sum: &mitkrb-md5sum;</para></listitem>
45<listitem><para>Download size: &mitkrb-size;</para></listitem>
46<listitem><para>Estimated disk space required:
47&mitkrb-buildsize;</para></listitem>
48<listitem><para>Estimated build time:
49&mitkrb-time;</para></listitem></itemizedlist>
50</sect3>
51
52<sect3><title><application><acronym>MIT</acronym> krb5</application>
53dependencies</title>
54<sect4><title>Optional</title>
55<para>
56<xref linkend="xinetd"/> (services servers only),
57<xref linkend="Linux_PAM"/> (for <command>xdm</command> based logins) and
58<xref linkend="openldap"/> (alternative for <command>krb5kdc</command>
59password database)
60</para>
61
62<note><para>
63Some sort of time synchronization facility on your system (like
64<xref linkend="ntp"/>) is required since Kerberos won't authenticate if there
65is a time difference between a kerberized client and the
66<acronym>KDC</acronym> server.</para></note>
67</sect4>
68
69</sect3>
70
71</sect2>
72
73<sect2>
74<title>Installation of <application><acronym>MIT</acronym>
75krb5</application></title>
76
77<para>
78<application><acronym>MIT</acronym> krb5</application> is distributed in a
79<acronym>TAR</acronym> file containing a compressed <acronym>TAR</acronym>
80package and a detached <acronym>PGP</acronym>
81<filename class="extension">ASC</filename> file.
82</para>
83
84<para>
85If you have installed <xref linkend="gnupg"/>, you can
86authenticate the package with the following command:
87</para>
88
89<screen><userinput><command>gpg --verify krb5-&mitkrb-version;.tar.gz.asc krb5-&mitkrb-version;.tar.gz</command></userinput></screen>
90
91<para>
92Build <application><acronym>MIT</acronym> krb5</application> by running the
93following commands:
94</para>
95
96<screen><userinput><command>cd src &amp;&amp;
97./configure --prefix=/usr --sysconfdir=/etc \
98 --localstatedir=/var/lib --enable-dns \
99 --enable-shared --mandir=/usr/share/man &amp;&amp;
100make</command></userinput></screen>
101
102<para>
103Install <application><acronym>MIT</acronym> krb5</application> by
104running the following commands as root:
105</para>
106
107<screen><userinput role='root'><command>make install &amp;&amp;
108mv /bin/login /bin/login.shadow &amp;&amp;
109cp /usr/sbin/login.krb5 /bin/login &amp;&amp;
110mv /usr/bin/ksu /bin &amp;&amp;
111mv /usr/lib/libkrb5.so.3* /lib &amp;&amp;
112mv /usr/lib/libkrb4.so.2* /lib &amp;&amp;
113mv /usr/lib/libdes425.so.3* /lib &amp;&amp;
114mv /usr/lib/libk5crypto.so.3* /lib &amp;&amp;
115mv /usr/lib/libcom_err.so.3* /lib &amp;&amp;
116ln -sf ../../lib/libkrb5.so.3 /usr/lib/libkrb5.so &amp;&amp;
117ln -sf ../../lib/libkrb4.so.2 /usr/lib/libkrb4.so &amp;&amp;
118ln -sf ../../lib/libdes425.so.3 /usr/lib/libdes425.so &amp;&amp;
119ln -sf ../../lib/libk5crypto.so.3 /usr/lib/libk5crypto.so &amp;&amp;
120ln -sf ../../lib/libcom_err.so.3 /usr/lib/libcom_err.so &amp;&amp;
121ldconfig</command></userinput></screen>
122
123</sect2>
124
125<sect2>
126<title>Command explanations</title>
127
128<para>
129<parameter>--enable-dns</parameter>: This switch allows realms to
130be resolved using the <acronym>DNS</acronym> server.
131</para>
132
133<para>
134<screen><command>mv /bin/login /bin/login.shadow
135cp /usr/sbin/login.krb5 /bin/login
136mv /usr/bin/ksu /bin</command></screen>
137Preserves <application>Shadow</application>'s <command>login</command>
138command, moves <command>ksu</command> and <command>login</command> to
139the <filename class="directory">/bin</filename> directory.
140</para>
141
142<para>
143<screen><command>mv /usr/lib/libkrb5.so.3* /lib
144mv /usr/lib/libkrb4.so.2* /lib
145mv /usr/lib/libdes425.so.3* /lib
146mv /usr/lib/libk5crypto.so.3* /lib
147mv /usr/lib/libcom_err.so.3* /lib
148ln -sf ../../lib/libkrb5.so.3 /usr/lib/libkrb5.so
149ln -sf ../../lib/libkrb4.so.2 /usr/lib/libkrb4.so
150ln -sf ../../lib/libdes425.so.3 /usr/lib/libdes425.so
151ln -sf ../../lib/libk5crypto.so.3 /usr/lib/libk5crypto.so
152ln -sf ../../lib/libcom_err.so.3 /usr/lib/libcom_err.so</command></screen>
153The <command>login</command> and <command>ksu</command> programs
154are linked against these libraries, therefore we move these libraries to
155<filename class="directory">/lib</filename> to allow logins without mounting
156<filename class="directory">/usr</filename>.
157</para>
158
159</sect2>
160
161<sect2>
162<title>Configuring <application><acronym>MIT</acronym> krb5</application></title>
163
164<sect3 id="krb5-config"><title>Config files</title>
165<para>
166<filename>/etc/krb5.conf</filename> and
167<filename>/var/lib/krb5kdc/kdc.conf</filename>
168</para>
169<indexterm zone="mitkrb krb5-config">
170<primary sortas="e-etc-krb5.conf">/etc/krb5.conf</primary></indexterm>
171<indexterm zone="mitkrb krb5-config">
172<primary sortas="e-var-lib-krb5kdc-kdc.conf">/var/lib/krb5kdc/kdc.conf</primary>
173</indexterm>
174</sect3>
175
176<sect3><title>Configuration Information</title>
177
178<sect4><title>Kerberos Configuration</title>
179<para>
180Create the Kerberos configuration file with the following command:
181</para>
182
183<screen><userinput role='root'><command>cat &gt; /etc/krb5.conf &lt;&lt; "EOF"</command>
184# Begin /etc/krb5.conf
185
186[libdefaults]
187 default_realm = <replaceable>[LFS.ORG]</replaceable>
188 encrypt = true
189
190[realms]
191 <replaceable>[LFS.ORG]</replaceable> = {
192 kdc = <replaceable>[belgarath.lfs.org]</replaceable>
193 admin_server = <replaceable>[belgarath.lfs.org]</replaceable>
194 }
195
196[domain_realm]
197 .<replaceable>[lfs.org]</replaceable> = <replaceable>[LFS.ORG]</replaceable>
198
199[logging]
200 kdc = SYSLOG[:INFO[:AUTH]]
201 admin_server = SYSLOG[INFO[:AUTH]]
202 default = SYSLOG[[:SYS]]
203
204# End /etc/krb5.conf
205<command>EOF</command></userinput></screen>
206
207<para>
208You will need to substitute your domain and proper hostname for the
209occurances of the <replaceable>[belgarath]</replaceable> and
210<replaceable>[lfs.org]</replaceable> names.
211</para>
212
213<para>
214<userinput>default_realm</userinput> should be the name of your domain changed
215to ALL CAPS. This isn't required, but both <application>Heimdal</application>
216and <acronym>MIT</acronym> recommend it.
217</para>
218
219<para>
220<userinput>encrypt = true</userinput> provides encryption of all traffic
221between kerberized clients and servers. It's not necessary and can be left
222off. If you leave it off, you can encrypt all traffic from the client to the
223server using a switch on the client program instead.
224</para>
225
226<para>
227The <userinput>[realms]</userinput> parameters tell the client programs where
228to look for the <acronym>KDC</acronym> authentication services.
229</para>
230
231<para>
232The <userinput>[domain_realm]</userinput> section maps a domain to a realm.
233</para>
234
235<para>
236Create the <acronym>KDC</acronym> database:
237</para>
238
239<screen><userinput role='root'><command>kdb5_util create -r <replaceable>[LFS.ORG]</replaceable> -s </command></userinput></screen>
240
241<para>
242Now you should populate the database with principles (users). For now,
243just use your regular login name or root.
244</para>
245
246<screen><userinput role='root'><command>kadmin.local</command></userinput>
247<prompt>kadmin:</prompt><userinput><command>addprinc <replaceable>[loginname]</replaceable></command></userinput></screen>
248
249<para>
250The <acronym>KDC</acronym> server and any machine running kerberized
251server daemons must have a host key installed:
252</para>
253
254<screen><prompt>kadmin:</prompt><userinput role='root'><command>addprinc -randkey host/<replaceable>[belgarath.lfs.org]</replaceable></command></userinput></screen>
255
256<para>
257After choosing the defaults when prompted, you will have to export the
258data to a keytab file:
259</para>
260
261<screen><prompt>kadmin:</prompt><userinput role='root'><command>ktadd host/<replaceable>[belgarath.lfs.org]</replaceable></command></userinput></screen>
262
263<para>
264This should have created a file in <filename class="directory">/etc</filename>
265named <filename>krb5.keytab</filename> (Kerberos 5). This file should have 600
266(root rw only) permissions. Keeping the keytab files from public access
267is crucial to the overall security of the Kerberos installation.
268</para>
269
270<para>
271Eventually, you'll want to add server daemon principles to the database
272and extract them to the keytab file. You do this in the same way you
273created the host principles. Below is an example:
274</para>
275
276<screen><prompt>kadmin:</prompt><userinput role='root'><command>addprinc -randkey ftp/<replaceable>[belgarath.lfs.org]</replaceable></command></userinput>
277<prompt>kadmin:</prompt><userinput role='root'><command>ktadd ftp/<replaceable>[belgarath.lfs.org]</replaceable></command></userinput></screen>
278
279<para>
280Exit the <command>kadmin</command> program (use <command>quit</command>
281or <command>exit</command>) and return back to the shell prompt. Start
282the <acronym>KDC</acronym> daemon manually, just to test out the
283installation:
284</para>
285
286<screen><userinput role='root'><command>/usr/sbin/krb5kdc &amp;</command></userinput></screen>
287
288<para>
289Attempt to get a ticket with the following command:
290</para>
291
292<screen><userinput><command>kinit <replaceable>[loginname]</replaceable></command></userinput></screen>
293
294<para>
295You will be prompted for the password you created. After you get your
296ticket, you can list it with the following command:
297</para>
298
299<screen><userinput><command>klist</command></userinput></screen>
300
301<para>
302Information about the ticket should be displayed on the screen.
303</para>
304
305<para>
306To test the functionality of the keytab file, issue the following
307command:
308</para>
309
310<screen><userinput><command>ktutil</command></userinput>
311<prompt>ktutil:</prompt><userinput><command>rkt /etc/krb5.keytab</command></userinput>
312<prompt>ktutil:</prompt><userinput><command>l</command></userinput></screen>
313
314<para>
315This should dump a list of the host principal, along with the encryption
316methods used to access the principal.
317</para>
318
319<para>
320At this point, if everything has been successful so far, you can feel
321fairly confident in the installation and configuration of the package.
322</para>
323
324<para>
325Install the <filename>/etc/rc.d/init.d/kerberos</filename> init script
326included in the <xref linkend="intro-important-bootscripts"/> package.
327</para>
328
329<screen><userinput role='root'><command>make install-kerberos</command></userinput></screen>
330
331</sect4>
332
333<sect4><title>Using Kerberized Client Programs</title>
334
335<para>
336To use the kerberized client programs (<command>telnet</command>,
337<command>ftp</command>, <command>rsh</command>,
338<command>rcp</command>, <command>rlogin</command>), you first must get
339an authentication ticket. Use the <command>kinit</command> program to
340get the ticket. After you've acquired the ticket, you can use the
341kerberized programs to connect to any kerberized server on the network.
342You will not be prompted for authentication until your ticket expires
343(default is one day), unless you specify a different user as a command
344line argument to the program.
345</para>
346
347<para>
348The kerberized programs will connect to non kerberized daemons, warning
349you that authentication is not encrypted.
350</para>
351</sect4>
352
353<sect4><title>Using Kerberized Server Programs</title>
354<para>
355Using kerberized server programs (<command>telnetd</command>,
356<command>kpropd</command>, <command>klogind</command> and
357<command>kshd</command>) requires two additional configuration steps.
358First the <filename>/etc/services</filename> file must be updated to
359include eklogin and krb5_prop. Second, the <filename>inetd.conf</filename>
360or <filename>xinetd.conf</filename> must be modified for each server that will
361be activated, usually replacing the server from <xref linkend="inetutils"/>.
362</para>
363</sect4>
364
365<sect4><title>Additional Information</title>
366<para>
367For additional information consult <ulink
368url="http://web.mit.edu/kerberos/www/krb5-1.3/#documentation">Documentation
369for krb-&mitkrb-version;</ulink> on which the above instructions are based.
370</para>
371
372</sect4>
373
374</sect3>
375
376</sect2>
377
378<sect2>
379<title>Contents</title>
380
381<para>
382The <application>MIT krb5</application> package contains
383<command>compile-et</command>,
384<command>ftp</command>,
385<command>ftpd</command>,
386<command>gss-client</command>,
387<command>gss-server</command>,
388<command>k5srvutil</command>,
389<command>kadmin</command>,
390<command>kadmin.local</command>,
391<command>kadmind</command>,
392<command>kadmind4</command>,
393<command>kdb5_util</command>
394<command>kdestroy</command>,
395<command>kinit</command>,
396<command>klist</command>,
397<command>klogind</command>,
398<command>kpasswd</command>,
399<command>kprop</command>,
400<command>kpropd</command>,
401<command>krb5-send-pr</command>,
402<command>krb5-config</command>,
403<command>krb524d</command>,
404<command>krb524init</command>,
405<command>krb5kdc</command>,
406<command>kshd</command>,
407<command>ksu</command>,
408<command>ktutil</command>,
409<command>kvno</command>,
410<command>login.krb5</command>,
411<command>rcp</command>,
412<command>rlogin</command>,
413<command>rsh</command>,
414<command>rshd</command>,
415<command>rxtelnet</command>,
416<command>rxterm</command>,
417<command>sclient</command>,
418<command>sim_client</command>,
419<command>sim_server</command>,
420<command>sserver</command>,
421<command>telnet</command>,
422<command>telnetd</command>,
423<command>uuclient</command>,
424<command>uuserver</command>,
425<command>v5passwd</command>,
426<command>v5passwdd</command>,
427<filename class="libraryfile">libcom_err</filename>,
428<filename class="libraryfile">libdes425</filename>,
429<filename class="libraryfile">libgssapi</filename>,
430<filename class="libraryfile">libgssrpc</filename>,
431<filename class="libraryfile">lib5crypto</filename>,
432<filename class="libraryfile">libkadm5clnt</filename>,
433<filename class="libraryfile">libkadm5srv</filename>,
434<filename class="libraryfile">libkdb5</filename>,
435<filename class="libraryfile">libkrb4</filename> and
436<filename class="libraryfile">libkrb5</filename>.
437</para>
438
439</sect2>
440
441<sect2><title>Description</title>
442
443<sect3><title>compile_et</title>
444<para>
445<command>compile_et</command> converts the table listing
446error-code names into a <application>C</application> source file.
447</para>
448</sect3>
449
450<sect3><title>k5srvutil</title>
451<para>
452<command>k5srvutil</command> is a host keytable manipulation utility.
453</para>
454</sect3>
455
456<sect3><title>kadmin</title>
457<para>
458<command>kadmin</command> is an utility used to make modifications
459to the Kerberos database.
460</para>
461</sect3>
462
463<sect3><title>kadmind</title>
464<para>
465<command>kadmind</command> is a server for administrative access
466to a Kerberos database.
467</para>
468</sect3>
469
470<sect3><title>kinit</title>
471<para>
472<command>kinit</command> is used to authenticate to the Kerberos server as
473a principal and acquire a ticket granting ticket that can later be used to
474obtain tickets for other services.
475</para>
476</sect3>
477
478<sect3><title>krb5kdc</title>
479<para>
480<command>krb5kdc</command> is a Kerberos 5 server.
481</para>
482</sect3>
483
484<sect3><title>kdestroy</title>
485<para>
486<command>kdestroy</command> removes the current set of tickets.
487</para>
488</sect3>
489
490<sect3><title>kdb5_util</title>
491<para>
492<command>kdb5_util</command> is the <acronym>KDC</acronym> database utility.
493</para>
494</sect3>
495
496<sect3><title>klist</title>
497<para>
498<command>klist</command> reads and displays the current tickets in
499the credential cache.
500</para>
501</sect3>
502
503<sect3><title>klogind</title>
504<para>
505<command>klogind</command> is the server that responds to
506<command>rlogin</command> requests.
507</para>
508</sect3>
509
510<sect3><title>kpasswd</title>
511<para>
512<command>kpasswd</command> is a program for changing Kerberos 5 passwords.
513</para>
514</sect3>
515
516<sect3><title>kprop</title>
517<para>
518<command>kprop</command> takes a principal database in a specified
519format and converts it into a stream of database
520records.
521</para>
522</sect3>
523
524<sect3><title>kpropd</title>
525<para>
526<command>kpropd</command> receives a database sent by
527<command>hprop</command> and writes it as a local database.
528</para>
529</sect3>
530
531<sect3><title>krb5-config</title>
532<para>
533<command>krb5-config</command> gives information on how to link
534programs against libraries.
535</para>
536</sect3>
537
538<sect3><title>ksu</title>
539<para>
540<command>ksu</command> is the super user program using Kerberos protocol.
541Requires a properly configured
542<filename class="directory">/etc/shells</filename> and
543<filename>~/.k5login</filename> containing principals authorized to
544become super users.
545</para>
546</sect3>
547
548<sect3><title>ktutil</title>
549<para>
550<command>ktutil</command> is a program for managing Kerberos keytabs.
551</para>
552</sect3>
553
554<sect3><title>kvno</title>
555<para>
556<command>kvno</command> prints keyversion numbers of Kerberos principals.
557</para>
558</sect3>
559
560</sect2>
561
562</sect1>
Note: See TracBrowser for help on using the repository browser.