source: postlfs/security/mitkrb.xml@ b6293773

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 b6293773 was b6293773, checked in by Larry Lawrence <larry@…>, 19 years ago

clean up old to-do's and update mitkrb5

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

  • Property mode set to 100644
File size: 18.6 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.4/krb5-&mitkrb-version;-signed.tar">
8 <!ENTITY mitkrb-download-ftp " ">
9 <!ENTITY mitkrb-md5sum "2fa56607677544e3a27b42f7cfa1155b">
10 <!ENTITY mitkrb-size "6.6 MB">
11 <!ENTITY mitkrb-buildsize "55 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</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.4/#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<segmentedlist>
382<segtitle>Installed Programs</segtitle>
383<segtitle>Installed Libraries</segtitle>
384<segtitle>Installed Directories</segtitle>
385
386<seglistitem>
387<seg>compile-et, ftp, ftpd, gss-client, gss-server, k5srvutil, kadmin,
388kadmin.local, kadmind, kadmind4, kdb5_util, kdestroy, kinit, klist,
389klogind, kpasswd, kprop, kpropd, krb5-send-pr, krb5-config, krb524d,
390krb524init, krb5kdc, kshd, ksu, ktutil, kvno, login.krb5, rcp, rlogin,
391rsh, rshd, rxtelnet, rxterm, sclient, sim_client, sim_server, sserver,
392telnet, telnetd, uuclient, uuserver, v5passwd, v5passwdd</seg>
393<seg>libcom_err.[so,a], libdes425.[so,a], libgssapi.[so,a], libgssrpc.[so,a],
394libkadm5clnt.[so,a], libkadm5srv.[so,a], libkdb5.[so,a], libkrb5.[so,a], libkrb4.[so,a]</seg>
395<seg>/usr/include/kerberosIV and /var/lib/krb5kdc</seg>
396</seglistitem>
397</segmentedlist>
398
399<variablelist>
400<bridgehead renderas="sect3">Short Descriptions</bridgehead>
401<?dbfo list-presentation="list"?>
402
403<varlistentry id="compile_et">
404<term><command>compile_et</command></term>
405<listitem><para>converts the table listing
406error-code names into a <application>C</application> source file..</para>
407<indexterm zone="mitkrb compile_et">
408<primary sortas="b-compile_et">compile_et</primary>
409</indexterm></listitem>
410</varlistentry>
411
412<varlistentry id="k5srvutil">
413<term><command>k5srvutil</command></term>
414<listitem><para>is a host keytable manipulation utility.</para>
415<indexterm zone="mitkrb k5srvutil">
416<primary sortas="b-k5srvutil">k5srvutil</primary>
417</indexterm></listitem>
418</varlistentry>
419
420<varlistentry id="kadmin">
421<term><command>kadmin</command></term>
422<listitem><para>is an utility used to make modifications
423to the Kerberos database.</para>
424<indexterm zone="mitkrb kadmin">
425<primary sortas="b-kadmin">kadmin</primary>
426</indexterm></listitem>
427</varlistentry>
428
429<varlistentry id="kadmind">
430<term><command>kadmind</command></term>
431<listitem><para>is a server for administrative access
432to a Kerberos database.</para>
433<indexterm zone="mitkrb kadmind">
434<primary sortas="b-kadmind">kadmind</primary>
435</indexterm></listitem>
436</varlistentry>
437
438<varlistentry id="kinit">
439<term><command>kinit</command></term>
440<listitem><para>is used to authenticate to the Kerberos server as
441a principal and acquire a ticket granting ticket that can later be used
442to obtain tickets for other services.</para>
443<indexterm zone="mitkrb kinit">
444<primary sortas="b-kinit">kinit</primary>
445</indexterm></listitem>
446</varlistentry>
447
448<varlistentry id="krb5kdc">
449<term><command>krb5kdc</command></term>
450<listitem><para>is a Kerberos 5 server.</para>
451<indexterm zone="mitkrb krb5kdc">
452<primary sortas="b-krb5kdc">krb5kdc</primary>
453</indexterm></listitem>
454</varlistentry>
455
456<varlistentry id="kdestroy">
457<term><command>kdestroy</command></term>
458<listitem><para>removes the current set of tickets.</para>
459<indexterm zone="mitkrb kdestroy">
460<primary sortas="b-kdestroy">kdestroy</primary>
461</indexterm></listitem>
462</varlistentry>
463
464<varlistentry id="kdb5util">
465<term><command>kdb5util</command></term>
466<listitem><para>is the <acronym>KDC</acronym> database utility.</para>
467<indexterm zone="mitkrb kdb5util">
468<primary sortas="b-kdb5util">kdb5util</primary>
469</indexterm></listitem>
470</varlistentry>
471
472<varlistentry id="klist">
473<term><command>klist</command></term>
474<listitem><para>reads and displays the current tickets in
475the credential cache.</para>
476<indexterm zone="mitkrb klist">
477<primary sortas="b-klist">klist</primary>
478</indexterm></listitem>
479</varlistentry>
480
481<varlistentry id="klogind">
482<term><command>klogind</command></term>
483<listitem><para>is the server that responds to
484<command>rlogin</command> requests.</para>
485<indexterm zone="mitkrb klogind">
486<primary sortas="b-klogind">klogind</primary>
487</indexterm></listitem>
488</varlistentry>
489
490<varlistentry id="kpasswd">
491<term><command>kpasswd</command></term>
492<listitem><para>is a program for changing Kerberos 5 passwords.</para>
493<indexterm zone="mitkrb kpasswd">
494<primary sortas="b-kpasswd">kpasswd</primary>
495</indexterm></listitem>
496</varlistentry>
497
498<varlistentry id="kprop">
499<term><command>kprop</command></term>
500<listitem><para>takes a principal database in a specified
501format and converts it into a stream of database
502records.</para>
503<indexterm zone="mitkrb kprop">
504<primary sortas="b-kprop">kprop</primary>
505</indexterm></listitem>
506</varlistentry>
507
508<varlistentry id="kpropd">
509<term><command>kpropd</command></term>
510<listitem><para>receives a database sent by
511<command>kprop</command> and writes it as a local database.</para>
512<indexterm zone="mitkrb kpropd">
513<primary sortas="b-kpropd">kpropd</primary>
514</indexterm></listitem>
515</varlistentry>
516
517<varlistentry id="krb5-config-1">
518<term><command>krb5-config</command></term>
519<listitem><para>gives information on how to link
520programs against libraries.</para>
521<indexterm zone="mitkrb krb5-config-1">
522<primary sortas="b-krb5-config-1">krb5-config</primary>
523</indexterm></listitem>
524</varlistentry>
525
526<varlistentry id="ksu">
527<term><command>ksu</command></term>
528<listitem><para>is the super user program using Kerberos protocol.
529Requires a properly configured
530<filename class="directory">/etc/shells</filename> and
531<filename>~/.k5login</filename> containing principals authorized to
532become super users.</para>
533<indexterm zone="mitkrb ksu">
534<primary sortas="b-ksu">ksu</primary>
535</indexterm></listitem>
536</varlistentry>
537
538<varlistentry id="ktutil">
539<term><command>ktutil</command></term>
540<listitem><para>is a program for managing Kerberos keytabs.</para>
541<indexterm zone="mitkrb ktutil">
542<primary sortas="b-ktutil">ktutil</primary>
543</indexterm></listitem>
544</varlistentry>
545
546<varlistentry id="kvno">
547<term><command>kvno</command></term>
548<listitem><para>prints keyversion numbers of Kerberos principals.</para>
549<indexterm zone="mitkrb kvno">
550<primary sortas="b-kvno">kvno</primary>
551</indexterm></listitem>
552</varlistentry>
553</variablelist>
554
555</sect2>
556
557</sect1>
Note: See TracBrowser for help on using the repository browser.