source: postlfs/security/mitkrb.xml@ dc04b84

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 dc04b84 was dc04b84, checked in by Randy McMurchy <randy@…>, 20 years ago

Removed moving and symlinking libcom_err libraries from MIT Kerberos and Heimdal instructions

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