source: postlfs/security/mitkrb.xml@ a2ed79b

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

update to MIT krb5-1.3.4

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

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