source: postlfs/security/mitkrb.xml@ 769e82a

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

updated to krb5-1.3.5

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

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