source: postlfs/security/mitkrb.xml@ d5d6554

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

Index errors

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

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