source: trunk/third/cns/doc/install.texinfo @ 8789

Revision 8789, 39.5 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8788, which included commits to RCS files with non-trunk default branches.
Line 
1\input texinfo    @c -*-texinfo-*-
2
3@finalout
4@setfilename kerb-inst-man
5
6@ifinfo
7
8@emph{Cygnus Network Security
9Installation Notes}
10January 1995
11
12John Gilmore
13Pat McGregor
14Cygnus Support
15
16CNS includes documentation and software developed at the Massachusetts
17Institute of Technology, which includes this copyright information:
18 
19Copyright @copyright{} 1989 by the Massachusetts Institute of Technology.
20
21@quotation 
22Export of software employing encryption from the United States of
23America is assumed to require a specific license from the United States
24Government.  It is the responsibility of any person or organization
25contemplating export to obtain such a license before exporting.
26@end quotation
27
28WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
29this software and its documentation for any purpose and without fee is
30hereby granted, provided that the above copyright notice appear in all
31copies and that both that copyright notice and this permission notice
32appear in supporting documentation, and that the name of M.I.T. not be
33used in advertising or publicity pertaining to distribution of the
34software without specific, written prior permission.  M.I.T. makes no
35representations about the suitability of this software for any purpose.
36It is provided ``as is'' without express or implied warranty.
37 
38Copyright @copyright{} 1993, 1994, 1995 Cygnus Support.
39
40Permission is granted to make and distribute verbatim copies of
41this manual provided the copyright notice and this permission notice
42are preserved on all copies.
43
44@ignore
45Permission is granted to process this file through TeX and print the
46results, provided the printed document carries a copying permission
47notice identical to this one except for the removal of this paragraph
48(this paragraph not being relevant to the printed manual).
49@end ignore
50
51Permission is granted to copy and distribute modified versions of this
52manual under the conditions for verbatim copying, provided also that
53the entire resulting derived work is distributed under the terms of a
54permission notice identical to this one.
55
56Permission is granted to copy and distribute translations of this manual
57into another language, under the above conditions for modified versions.
58
59@end ifinfo
60
61@setchapternewpage odd
62@settitle Cygnus Network Security
63@titlepage
64@title Cygnus Network Security
65@subtitle Installation Notes
66@sp 2
67@subtitle January 1995
68@vfill
69@author Mark Eichin
70@author Pat McGregor
71@author Cygnus Support
72
73@page
74
75@vskip 0pt plus 1filll
76
77CNS includes documentation and software developed at the Massachusetts
78Institute of Technology, which includes this copyright information:
79 
80Copyright @copyright{} 1989 by the Massachusetts Institute of Technology.
81
82@quotation 
83Export of software employing encryption from the United States of
84America is assumed to require a specific license from the United States
85Government.  It is the responsibility of any person or organization
86contemplating export to obtain such a license before exporting.
87@end quotation
88
89WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
90this software and its documentation for any purpose and without fee is
91hereby granted, provided that the above copyright notice appear in all
92copies and that both that copyright notice and this permission notice
93appear in supporting documentation, and that the name of M.I.T. not be
94used in advertising or publicity pertaining to distribution of the
95software without specific, written prior permission.  M.I.T. makes no
96representations about the suitability of this software for any purpose.
97It is provided ``as is'' without express or implied warranty.
98
99Copyright @copyright{} 1993, 1994, 1995 Cygnus Support.
100
101Permission is granted to make and distribute verbatim copies of
102this manual provided the copyright notice and this permission notice
103are preserved on all copies.
104
105Permission is granted to copy and distribute modified versions of this
106manual under the conditions for verbatim copying, provided also that
107the entire resulting derived work is distributed under the terms of a
108permission notice identical to this one.
109
110Permission is granted to copy and distribute translations of this manual
111into another language, under the above conditions for modified versions.
112@end titlepage
113
114@ifinfo
115@node Top, Installing CNS, (dir), (dir)
116@top Cygnus Network Security
117
118@menu
119* Installing CNS::              Installing CNS at Your Site
120* Choosing a Realm Name::       Choosing a Kerberos Realm Name
121* Installation overview::       CNS Installation Overview
122* Installation on any machine:: Installation on any machine
123* Configuring the KDC::         Configuring the Key Distribution Center
124* Application server configuration::  Configuring an Application Server
125* Adding users::                Adding users to the Kerberos database
126@end menu
127@end ifinfo
128           
129@node Installing CNS, Choosing a Realm Name, Top, Top
130@chapter Installing CNS at Your Site
131
132Cygnus Support developed Cygnus Network Security (CNS) to provide strong
133system access security, with minimal impact on users' ease of access.
134Using Kerberos Version 4 encryption and client-server technology, CNS
135assures that user identities can be checked securely without
136transmitting passwords in clear over the Net.  CNS is useful in closing
137up several large security holes: eavesdroppers recording login names and
138passwords as your users log in from remote locations; and active attacks
139based on providing a fake TCP/IP source address (IP address spoofing).
140
141Introducing CNS to an existing site involves more planning and execution
142than installing the average software package.  CNS software is required
143on both ends of the remote login connections, and remote users must
144change their habits.
145
146To install CNS and make it useful, you have to:
147
148@itemize @bullet
149@item
150Install and configure the CNS software on the machines at your site.
151@item
152Set up a CNS Key Distribution Center server machine.
153@item
154[Optional] Set up one or more slave servers for reliability.
155@item
156Install and configure CNS client software on the machines from which
157your remote users log in.
158@item
159Add users and their passwords to your CNS server.
160@item
161Inform your users about CNS.
162@item
163[Optional] Turn off ordinary @code{rlogin}, @code{telnet}, and
164@code{rsh} services so that users are @emph{required} to use CNS rather
165than potentially exposing their passwords.
166@end itemize
167
168This manual covers only basic installation and configuration of the CNS
169software.  See the @ref{Top,,Administration Tools,kerbman,Cygnus Network
170Security User and Administrator Documentation for CNS Version 1}, manual
171for more detailed information.
172
173@node Choosing a Realm Name, Installation overview, Installing CNS, Top
174@chapter Choosing a Realm Name
175
176You must chose a Kerberos realm name for your site.  Although your realm
177name can be any string, there are certain conventions.  The @sc{CNS}
178programs follow these conventions by default, so if you follow them as
179well you have to put less information in the @file{krb.conf} and
180@file{krb.realms} configuration files (these configuration files are
181described below).
182
183@itemize @bullet
184@item
185Realm names are always upper case strings.
186@item
187For a host named @samp{xxx.yyy}, the conventional Kerberos realm is
188@samp{XXX.YYY}.
189@item
190For a host named @samp{xxx.yyy.zzz}, the conventional Kerberos realm is
191@samp{YYY.ZZZ}.
192@item
193For a host named @samp{www.xxx.yyy.zzz}, the conventional Kerberos realm
194is @samp{XXX.YYY.ZZZ}, and so forth for additional levels in the host
195name.
196@end itemize
197
198@node Installation overview, Installation on any machine, Choosing a Realm Name, Top
199@chapter CNS Installation Overview
200
201A machine running CNS may act in three roles.  A single machine can act
202simultaneously in any combination of these three roles:
203
204@itemize @bullet
205@item
206Kerberos Key Distribution Center server (providing password checking
207service)
208@item
209User Client (providing programs to let users login to Kerberized
210application servers)
211@item
212Application server (providing @code{rlogin}, @code{telnet}, @code{rsh},
213and @code{rcp} services for client machines)
214@end itemize
215
216To use CNS, you need a main Key Distribution server and, preferably, one
217or more backups.  Backups make it possible for your site to function
218even if the main server machine is unavailable.
219
220If possible, you should make @file{kerberos.@var{REALM}} be an alias for
221your main server machine.  For example, the main server of the realm
222CYGNUS.COM is known as @file{kerberos.cygnus.com}.  When the CNS
223binaries need to contact a Key Distribution Center server for a
224particular realm, they contact the machine named @samp{kerberos} by
225default.  The @file{krb.conf} file may be used to override this default,
226as well as to name additional backup servers for a realm.  The
227@file{krb.conf} file is described below.
228
229You should normally set up all machines at your site as application
230servers.  This permits users to log into them directly using the CNS
231programs.
232
233You should set up all machines from which your users log in, as CNS
234clients.  This normally includes all machines at your site.
235
236The following sections of this manual tell how to set up each CNS role.
237
238@node Installation on any machine, Configuring the KDC, Installation overview, Top
239@chapter Installation on any Machine
240
241@menu
242* Background::                  Background Information
243* Instructions::                Installation Instructions
244@end menu
245
246@node Background, Instructions, Installation on any machine, Installation on any machine
247@section Background Information
248
249On all platforms, please use the instructions in the following section
250to install the binary software and perform the initial configuration.
251(If you need to compile the software from source code, see the
252@file{README} file in the source code.)
253
254You need to be operating as the @samp{root} user in order to create the
255@file{/usr/kerberos} directory, where the CNS package is being
256installed.  You also need to be @samp{root} when running various steps
257of the configuration procedures.
258
259Your system's security is only as good as the security of your
260@samp{root} password.  Please take other precautions to protect your
261system security in addition to installing CNS.  CNS cannot protect you
262from someone who is able to steal @samp{root} privileges.  CNS also does
263not protect you from break-ins caused by bugs in your daemons (e.g.,
264@code{fingerd} or @code{sendmail}).  On almost all Unix systems, if
265intruders can break in as an ordinary users, they can become root by
266exploiting bugs or imperfect configuration files.
267
268CNS installation is partially automated, but you must do some steps by
269hand.  Please read through the installation instructions completely
270before you begin the installation.  If you find unfamiliar concepts or
271words, please consult the glossary in @ref{Glossary,,Administration
272Tools,,Cygnus Network Security User and Administrator Documentation for
273CNS Version 1}.
274
275@node Instructions, , Background, Installation on any machine
276@section Installation Instructions
277
278These installation instructions are for the installation of pre-compiled
279binaries.  Be sure you run this as @samp{root}.
280
281These directions install CNS under @file{/usr/kerberos}.  This version
282of the software is not easily installed in other places.  However, if
283you want to install it elsewhere, you can do so by making a symbolic
284link in @file{/usr/kerberos}.  We recommend that for machines that act
285as CNS Kerberos Key Distribution Center servers, you place the files on
286a local disk.  This prevents failures due to a file server being down or
287unreachable.
288
289The entire CNS Kerberos tree can be safely shared among machines of the
290same architecture.  @file{/etc/krb-srvtab} is the only machine-dependent
291file.
292
293@enumerate
294@item If you wish to put the files somewhere other than @file{/usr/kerberos},
295create a symbolic link as follows:
296@example
297ln -s /where/ever/you/want /usr/kerberos
298@end example
299All the directories in the @file{/where/ever/you/want} path must exist,
300with the possible exception of last one, which is automatically created
301when you unpack the distribution software.
302
303@item If CNS is not currently installed on this machine, it is
304simplest to unpack the tape directly into @file{/usr/kerberos}.  Change
305directory to @file{/}.
306
307@item If CNS is already installed on this machine, it is best to
308unpack the tape in a directory other than @file{/usr/kerberos}.  The
309installation procedure copies the binaries into place safely, without
310disturbing any running programs.  Change directory to a directory with
311enough room to hold the CNS binaries.  They unpack into the subdirectory
312@file{usr/kerberos}.
313
314@item If you are using a FTP'ed distribution, unpack the binaries using
315the command @code{uncompress < @var{machine-type}.tar.Z | tar xvf -}.
316The source code is available as a separate tar file, which may be
317unpacked using the corresponding command @code{uncompress < src.tar.Z |
318tar xvf -}.
319
320@item If your distribution is on tape, unpack the tape using the
321@code{tar xv} command.  You may have to use @code{tar xvf @var{TAPE}},
322where @var{TAPE} is the name of the tape drive you are using.
323
324The source code is stored as a second file on the same tape.  To unpack
325the source code, you must skip the first file on the tape, and then
326unpack the sources using @code{tar xvf} just as you unpacked the
327binaries.  To skip the first file on the tape, on most systems use
328@code{mt -f @var{TAPE} fsf}.  On systems such as HP/UX or Irix 4, you
329must use @code{mt -t @var{TAPE} fsf} (i.e., use the option @samp{-t}
330rather than @samp{-f}).  On SCO or SVR4 systems, use the command
331@samp{tape fsf @var{TAPE}}.  Check the man pages for @samp{mt} or
332@samp{tape} on your system.
333
334@item Run @code{usr/kerberos/install/configure}.
335@itemize @bullet
336@item The configure script prompts:
337@smallexample
338If you've unpacked the tape in @var{DIR},
339just press @kbd{RETURN};
340If you've installed it below some other directory,
341enter it now.
342@end smallexample
343
344@noindent
345The configure script tries to determine the directory where you have
346unpacked the tape.  If the reported directory is correct, just press
347@kbd{RETURN}.  Otherwise, enter the name of the directory where you
348unpacked the tape.  If you have not unpacked the tape under @file{/},
349the script automatically copies the new binaries into
350@file{/usr/kerberos} without overwriting the existing binaries.
351
352@item The CNS configuration script automatically fixes the
353permissions on the CNS binaries, and it automatically checks that
354appropriate entries have been added to the @file{/etc/services} file.
355If any errors occur doing these steps, the script exits with an error
356message.
357
358@item If the file @file{/usr/kerberos/lib/krb.conf} exists, the
359configuration script assumes that CNS was already installed.  It prints
360@smallexample
361Existing configuration for realm REALM preserved.
362To reconfigure it, delete /usr/kerberos/lib/krb.conf
363and re-run configure.
364@end smallexample
365
366@item If the file @file{/usr/kerberos/lib/krb.conf} does not exist, CNS
367prompts:
368@smallexample
369Enter name of local realm (for example, CYGNUS.COM):
370@end smallexample
371
372@noindent
373Enter the name you wish to use for your realm, all in uppercase. For
374one-host sites, the realm name is the normally the same as the host name
375(in capital letters).  At larger sites, the realm name is usually the
376capitalized name of the main Internet domain (e.g.  CYGNUS.COM or
377EFF.ORG).  At large sites, there may be several realms (e.g. ENG.SUN.COM
378and MKTG.SUN.COM).
379@end itemize
380
381@item If you are updating an existing CNS installation on this machine,
382you are almost finished.  You should test the new client programs, such as
383@code{kinit} and @code{rlogin}, to make sure they continue to work as
384expected.  If this is machine is a Key Distribution Center, you should
385reboot it to start running the updated CNS server software.  If this
386machine is an application server, you should skip to
387@ref{Application server configuration, Configuring an Application Server,
388Configuring an Application Server}, to consider turning off non-CNS
389access and to turn on the new @code{ftp} and @code{telnet} daemons.
390
391If this is a new CNS installation, you should continue following the
392installation instructions.
393
394@item If your realm name is different from your full Internet
395hostname with the first component stripped off, you must tell CNS how to
396map your hostname to your realm name.  For example, if your hostname is
397@file{bogon.company.org}, CNS programs assume that your realm is
398@code{COMPANY.ORG} by default.  If you pick any other realm name
399(perhaps @code{MKTG.COMPANY.ORG}), you have to edit the file
400@file{/usr/kerberos/lib/krb.realms}.  Add two lines to the file to
401specify your domain name suffix, a space, and your realm name.  One line
402should start with an initial dot, the other should not have it.
403Example:
404@example
405company.org     MKTG.COMPANY.ORG
406.company.org    MKTG.COMPANY.ORG
407@end example
408
409If you add your domain name to @file{krb.realms}, make sure that all
410your local and remote machines running CNS have the same entries in
411their local @file{krb.realms} files.
412
413@item When a CNS client program retrieves a ticket for a realm, it
414needs to know the hostname of the Key Distribution Center for that
415realm.  The default server host name is @file{kerberos.@var{REALM}}.
416For example, the server for the realm @file{CYGNUS.COM} is
417@file{kerberos.cygnus.com}.  If your users access realms which do not
418follow this convention, or if you want to specify more than one Key
419Distribution Center for a given realm, you must modify the file
420@file{/usr/kerberos/lib/krb.conf}.  If you make changes to
421@file{krb.conf}, you must make sure that the versions on all user
422clients correspond.
423
424For each CNS Key Distribution Center or backup center, add a line to the file
425@file{/usr/kerberos/lib/krb.conf} that contains the realm name, followed
426by a space or tab, and the hostname of one of the Key Distribution
427Centers for that realm.  If the realm has multiple key distribution
428centers, use multiple lines.  On the line that refers to the master
429server (which also runs the @code{kadmind} daemon), add the words
430``admin server'' to the end of the line.  Example:
431@example
432MKTG.CORP.ORG kerberos.corp.org admin server
433MKTG.CORP.ORG backupserver.corp.org
434PODUNK.UNIVERSITY.EDU kerberos.podunk.edu admin server
435NEAR.NET kerberos.near.net
436@end example
437
438@noindent
439In this example, the last line is not actually necessary, because
440@file{kerberos.near.net} is the default server for realm
441@file{NEAR.NET}.
442
443The first line of the @file{krb.conf} file is special: it specifies the
444name of the default realm on this machine.  Do not change it.
445
446@item @emph{If this is the first time you have installed CNS on your systems,
447go on to @ref{Configuring the KDC, Configuring the Key Distribution
448Center, Configuring the Key Distribution Center}.  If this is not the
449first time you have installed CNS, go to the next step.}
450
451@item If this is a client-only installation, test the installation
452by running @code{/usr/kerberos/bin/kinit}.  It should prompt you for a
453``Kerberos name,'' by which it means your CNS Kerberos user name.  Enter
454your user name in the default realm.  You should get a @code{Password:}
455prompt.  If you do not, your client programs cannot find a key
456distribution center for that realm; recheck your @file{krb.conf} file.
457If you are not running Domain Name Service, also check your @file{/etc/hosts}
458file.  If you do get the @code{Password:} prompt, enter your password in
459this realm.  @code{Kinit} should exit without any error messages, and
460@code{klist} should show a single ticket whose Principal is
461``krbtgt.REALM@@REALM.''  You can now test the application programs from
462@file{/usr/kerberos/bin} (such as @code{rlogin}), or you can just type
463@code{kdestroy} to destroy that ticket.
464
465If your users access multiple realms, test each realm in turn, by typing
466@code{kinit -r} and @kbd{RETURN}, entering the user name as above, and
467then entering the realm name at the @file{Kerberos realm:} prompt.
468
469@end enumerate
470
471If you are only installing CNS client services, your installation is
472complete.  Congratulations.  You and your users should add
473@code{/usr/kerberos/bin} to the path used to find programs.
474
475@node Configuring the KDC, Application server configuration, Installation on any machine, Top
476@chapter Configuring the Key Distribution Center
477
478This section describes how to configure the Key Distribution Center
479(KDC) server machine.  You must have at least one KDC in your realm.
480You may also set up backup servers; see @ref{Top,,Administration
481Tools,kerbman,Cygnus Network Security User and Administrator
482Documentation for CNS Version 1}.
483
484@enumerate
485
486@item Log on to the server machine as @samp{root}.
487
488@item Add @file{/usr/kerberos/bin} and @file{/usr/kerberos/etc} to the
489working path.
490
491@item Run @code{kdb_init} to create the initial CNS Kerberos
492password database.  Enter the realm name, and make up a good master
493password.  For effective system security, it is important to choose a
494password that cannot easily be guessed or discovered.  This password is
495used to encrypt the database on disk, so that it can be safely included
496in normal backup procedures; it is not used for any network operation.
497You @emph{must not forget} this password.  Example:
498@smallexample
499sample# kdb_init
500Realm name [default  error-default-realm ]: @file{COMPANY.ORG}
501You will be prompted for the database Master Password.
502It is important that you NOT FORGET this password.
503
504Kerberos master key: @emph{password does not echo}
505Verifying, please re-enter Kerberos master key: @emph{reenter password}
506
507@end smallexample
508
509@item Store the master password in @file{/.k} for convenience or unattended
510operation.  (If you do not do this, you must type the master password
511each time the system reboots.)  Run @code{kstash}, giving it the master
512password:
513@smallexample
514sample# kstash
515
516Kerberos master key: @emph{password does not echo}
517
518Current Kerberos master key version is 1.
519
520Master key entered.
521@end smallexample
522
523@item Set up the database entries for the first user---yourself.
524Run @code{kdb_edit}, and enter the master key when prompted.  When it
525asks for @code{Principal name:}, enter your user name.  At
526@code{Instance:}, just press @kbd{RETURN}.  @code{kdb_edit} tells you
527that this entry is not found, and ask whether to create it.  Type
528@kbd{y}.
529
530When prompted for the initial password for the user (yourself), enter a
531short, easy to remember password.  This will be changed in a few
532minutes, so keep it simple.  You are prompted to enter it twice.  Press
533@kbd{RETURN} for all the other questions.
534
535When @code{kdb_edit} prompts again for @code{Principal name:}, enter
536your user name again, but for @code{Instance:}, type @code{admin}.  This
537creates an admin instance that you can later use to add new users and
538change user passwords.
539
540To exit @code{kdb_edit}, just press @kbd{RETURN} at the @code{Principal
541name:} prompt.
542
543Example:
544
545@smallexample
546sample# kdb_edit
547Opening database...
548 
549Kerberos master key: @emph{password does not echo}
550
551Current Kerberos master key version is 1.
552
553Master key entered.  Previous or default values are
554in [brackets]
555enter @kbd{RETURN} to leave the same, or new value.
556
557Principal name: jis
558Instance:
559
560<Not found>, Create [y] ? y
561
562Principal: jis, Instance: , kdc_key_ver: 1
563New Password: @emph{user's password will not echo}
564Verifying, please re-enter
565New Password: @emph{user's password will not echo}
566
567Principal's new key version = 1
568Expiration date (enter yyyy-mm-dd) [ 1999-12-31 ] ?
569Max ticket lifetime (*5 minutes) [ 255 ] ?
570Attributes [ 0 ] ?
571Edit O.K.
572Principal name: jis
573Instance: admin
574
575<Not found>, Create [y] ? y
576
577Principal: jis, Instance: admin, kdc_key_ver: 1
578New Password: @emph{user's admin password will not echo}
579Verifying, please re-enter
580New Password: @emph{user's admin password will not echo}
581
582Principal's new key version = 1
583Expiration date (enter yyyy-mm-dd) [ 1999-12-31 ] ?
584Max ticket lifetime (*5 minutes) [ 255 ] ?
585Attributes [ 0 ] ?
586Edit O.K.
587Principal name:         @emph{press @kbd{RETURN} to exit}
588
589@end smallexample
590
591@item Run @code{kerberos &} to start the Key Distribution Center
592server (the @code{&} runs the server in the background).  You should
593see:
594@smallexample
595sample#  kerberos &
596[1] 22630
597sample#  Kerberos server starting
598        Sleep forever on error
599        Log file is /usr/kerberos/database/kerberos.log
600Current Kerberos master key version is 1.
601
602Master key entered.
603
604Current Kerberos master key version is 1
605Local realm: COMPANY.ORG
606@end smallexample
607
608@item Test the Key Distribution Center server.  Run @code{kinit}
609with your username as argument (e.g., @code{kinit jis}).  If you get a
610password prompt, the network is okay, and everything is configured
611properly for this host to find the server.  Type your password (this is
612the password you just entered using @code{kdb_edit}).
613
614If you get @samp{send_to_kdc: retry count exceeded}, then @code{kinit}
615could not reach the server for some reason.  Make sure that any entry
616for your realm in @file{/usr/kerberos/lib/krb.conf} has the right
617machine name. If there is no entry, make sure that the server machine
618can be reached using the alias @file{kerberos.@var{REALM}}.  Try
619contacting the machine using @code{telnet} or @code{ping}.  Also, check
620that the @code{Kerberos} process is actually running.
621
622If you get an immediate @samp{kinit: Can't send request (send_to_kdc)}
623the most likely cause is that @code{kinit} can't find or read the
624@file{krb.conf} file, or can't find any entries for the selected realm
625in that file. If there is a delay before the message, it is more likely
626that the file was found but there was some problem communicating with
627the server.
628
629@emph{Special note for Solaris 2 users:} Solaris 2 includes a partial
630installation of kerberos, consisting of @code{kinit} and little
631else. Since the Solaris @code{kinit} is in @file{/usr/bin}, it may
632appear in your path ahead of the @file{/usr/kerberos/bin} version that
633you've just installed, leading to errors similar to those above. While
634the Solaris @code{kinit} will work with CNS Kerberos, it looks in
635@file{/etc/krb.conf} instead of @file{/usr/kerberos/lib/krb.conf} and
636thus won't find the information you'd expect it to. Since users will
637normally have @file{/usr/kerberos/bin} near the front of their path in
638order to get the CNS Kerberos @code{rlogin}, @code{rsh}, @code{telnet},
639and @code{ftp} instead of the regular (non-Kerberos) versions, they will
640also get the correct version of @code{kinit} but this can be a source of
641difficulty in an initial installation.
642
643@item Authorize yourself to use the @code{kadmin} program to make
644administrative changes to the CNS Kerberos database.  Using a text
645editor, create four files in @file{/usr/kerberos/database}:
646@file{admin_acl.add}, @file{admin_acl.get}, @file{admin_acl.mod}, and
647@file{admin_acl.del}.
648These files should all have identical contents.  They should each
649contain one line---your username, a period, and @code{admin}.  If you
650want to set up multiple administrators, you can add additional lines to
651these files now or later.  (You also need to add their username and
652password to the CNS Kerberos database using @code{kadmin}---as shown
653later---or @code{kdb_edit}.)  Example:
654@example
655sample# cd /usr/kerberos/database
656sample# cat >admin_acl.add
657jis.admin
658^D
659sample# cp admin_acl.add admin_acl.get
660sample# cp admin_acl.add admin_acl.mod
661sample# cp admin_acl.add admin_acl.del
662@end example
663
664If sometime later, while running @code{kadmin}, you get the error
665message, ``Insufficient access to perform requested operation,'' it
666indicates you have successfully contacted the Admin Server, but your
667name was not found in the relevant @file{admin_acl} file.  Look in
668@file{/usr/kerberos/database/admin_server.syslog} to find the audit
669trail of administrative requests failures marked with @samp{WARNING}.
670
671@item Run @code{kadmind -n &} to start the Admin Server, which handles
672administrative requests and password changes.
673@smallexample
674sample# kadmind -n &
675KADM Server KADM0.0A initializing
676Please do not use 'kill -9' to kill this job, use a
677regular kill instead
678
679KADM Server starting in NON-FASCIST mode for the purposes
680for password changing
681
682Current Kerberos master key version is 1.
683
684Master key entered.
685@end smallexample
686
687@item Test the Admin Server by using @code{kadmin} to change your
688password.  You must either first log in as yourself, or use the
689@samp{-u} argument to @code{kadmin} to provide your user ID.
690@smallexample
691sample# kadmin -u jis
692Welcome to the Kerberos Administration Program, version 2
693Type @kbd{help} if you need it.
694admin:  cpw jis
695Admin password:
696     @emph{the admin password you assigned yourself above}
697New password for jis: @emph{invent and remember a good one}
698Verifying, please re-enter
699      New password for jis: @emph{type the same one}
700Password changed for jis.
701admin:  quit
702Cleaning up and exiting.
703sample#
704@end smallexample
705Be sure that you remember your new password.  If you forget it, you
706cannot use the system.
707
708@item Run @code{kdestroy} to destroy the tickets used in testing.
709
710@item Update your @file{/etc/rc} file, or equivalent, so that these two
711daemons are run each time the system reboots:
712@example
713/usr/kerberos/etc/kerberos &
714/usr/kerberos/etc/kadmind -n &
715@end example
716
717These should be started early in the boot process---after the file
718systems are mounted, but before the portmapper starts up.  The admin
719daemon uses an unofficial port number which the portmapper may acquire
720if portmapper is started first.
721
722If your system initializes using files in a directory like
723@file{/etc/rc2.d}, look for the script which starts @code{portmap}, and
724make sure that the daemons are started earlier.  This can be done by
725starting them earlier in the same script, or by creating a new script
726with a lower number.  On the other hand, make sure that the daemons are
727not started until the network has been initialized.
728
729@item @emph{Special note for HP/UX startup}: Under HP/UX
730the commands mentioned above should be placed in a seperate file, and
731that file should be run from the @code{localrc()} function in the
732@file{/etc/rc} file. Placing the commands directly in @code{localrc()}
733may cause them to be terminated immediately after @file{/etc/rc} finishes.
734
735@item Reboot your system, examine its messages while it boots, and
736rerun the tests, to make sure that the daemons both start successfully.
737@end enumerate
738
739@node Application server configuration, Adding users, Configuring the KDC, Top
740@chapter Configuring an Application Server
741
742To configure a machine to provide @code{rlogin} and @code{rsh} service,
743you need to create a secret key for that machine in the CNS database and
744on the host itself.
745
746(If you are upgrading from an existing CNS release to this release, you
747have already set up your machine's secret key.  Skip down to the step
748``Test your CNS services'', and do the rest of the procedure.)
749
750The master database contains entries for all network services that
751require CNS Kerberos authentication.  If, for example, you want to offer
752@code{rlogin} service from the machine @file{trickster}, you need to
753register @file{trickster} in the master database.
754
755CNS does not recognize full domain names.  Therefore, use the first
756component of the DNS hostname (e.g., @file{trickster} for
757@file{trickster.company.org}).
758
759@enumerate
760@c 1
761@item From as account for which you created an admin instance,
762run @code{kadmin}.  At the prompt, type:
763@smallexample
764ank rcmd.@var{hostname}
765@end smallexample
766@noindent
767@code{ank} means ``add new key'' and you are telling it to add a service
768key for the @code{rcmd} service on machine @var{hostname}.
769
770@smallexample
771sample# kadmin
772Welcome to the Kerberos Administration Program, version 2
773Type @kbd{help} if you need it.
774admin:  ank rcmd.trickster
775Admin password:
776    @emph{the jis.admin password you created with kdb_edit}
777Password for rcmd.trickster: @emph{some short easy password}
778Verifying, please re-enter
779    Password for rcmd.trickster: @emph{Re-enter.}
780rcmd.trickster added to database.
781admin:  quit
782
783@end smallexample
784
785@noindent
786Note: You use this same process to add any other new users to the
787database, except that you use their username as the argument to the
788@code{ank} command.  Remind your users to change their CNS passwords
789once they have begun to use CNS, so you do not know what their passwords
790are.
791
792@c 2
793@item On the application server, as root, run @code{ksrvutil add}. This
794creates the srvtab file, @file{/etc/krb-srvtab}.
795
796@smallexample
797# ksrvutil add
798Name: rcmd
799Instance: trickster
800Realm: COMPANY.ORG @emph{remember to use uppercase here!}
801Version number: 1
802New principal: rcmd.trickster@@COMPANY.ORG; version 1
803Is this correct? (y,n) [y] y
804Password: @emph{Give the easy password}
805Verifying, please re-enter Password: @emph{do it again}
806Key successfully added.
807Would you like to add another key? (y,n) [y] n
808Old keyfile in /etc/krb-srvtab.old.
809@end smallexample
810
811You must give the same password here that you gave to @code{kadmin} in
812the @code{ank} (add new key) process.
813
814@c 3
815@item Run @code{ksrvutil change}.  This updates the key to a new one, not
816known to you, in both the Kerberos database for your realm, and in the
817@file{/etc/srvtab}.
818
819Use the following list of troubleshooting suggestions if any problems
820arise at this stage:
821
822@itemize @bullet
823@c 3.1
824@item Clocks not synchronized.  The time on client machines, and all other
825machines communicating via CNS, must be within five minutes of each other.
826Synchronize all machine time settings.
827
828@item Incorrect name specification.  Be sure that the file
829@file{/usr/kerberos/lib/krb.conf} has the correct realm and key server's
830hostname.
831
832@c 3.2
833@item Password error.  Type @kbd{rm /etc/krb-srvtab} and run
834@code{ksrvutil add} again.
835
836@c 3.3
837@item Problem with @code{kinit @var{user}}.  If @code{kinit @var{user}} does
838not work, debug that first, using the suggestions in the section
839@ref{Configuring the KDC,,Configuring the Key Distribution Center}.
840
841@c 3.4
842@item Problem with @code{kinit rcmd.@var{hostname}}.  If @code{kinit
843rcmd.@var{hostname}} does not work, there could be several explanations.
844
845If @code{kinit} reports @samp{principal unknown}, then go back and run
846@code{kadmin} again and correctly enter the item in the database.
847
848If @code{kinit} reports @samp{incorrect password}, then you have given a
849different password than you did originally.  If you remember the correct
850password, delete @file{/etc/krb-srvtab}, then go back and run
851@code{ksrvutil add} again.  If you do not remember the password, change
852the one in the database to something you will remember.  To change the
853password, run @code{kadmin} again.  Use @code{cpw rcmd.@var{hostname}}
854to set the password to something you will remember.  Delete
855@file{/etc/krb-srvtab} and run @code{ksrvutil add} again.  Run
856@code{ksrvutil change} again too.  This time, it tells you that the
857version numbers of the keys do not match, and ask if you want it to fix
858this.  Type @kbd{yes}.
859
860@item Problem only with @code{ksrvutil}. If @code{kinit rcmd.@var{hostname}}
861works, but @code{ksrvutil change} fails, in particular with the message
862``Retry count exceeded (send_to_kdc)'' verify that the realm name is
863both uppercase and spelled correctly in the @file{/etc/krb-srvtab} file
864using @code{ksrvutil list}. If it isn't, follow the above procedure for
865deleting and correcting the file.
866@end itemize
867
868@c 4
869@item Update @file{/etc/inetd.conf}.  Add these lines to the file and reset
870the @code{inetd} daemon.  Unless your system documentation recommends
871another procedure, use @code{kill -HUP} to reset the current daemon.
872
873@iftex
874@let@nonarrowing=@comment
875@end iftex
876@smallexample
877klogin  stream tcp nowait root /usr/kerberos/etc/klogind klogind
878eklogin stream tcp nowait root /usr/kerberos/etc/klogind eklogind
879kpop    stream tcp nowait root /usr/kerberos/etc/popper  popper
880kshell  stream tcp nowait root /usr/kerberos/etc/kshd    kshd
881@end smallexample
882@iftex
883@let@nonarrowing=@relax
884@end iftex
885
886@c 5
887@item Test your CNS services. 
888(Remember to update your path to place @file{/usr/kerberos/bin} before
889@file{/usr/ucb} in your path variable.)
890
891To try @code{rlogin}: on a working client machine (possibly the same
892machine): run @code{kinit}, type your name and password, and then run
893@code{rlogin @var{app-hostname}}, supplying the hostname you just set up
894as an Application Server.  If it works, try @code{rlogin @var{hostname}
895-x} to test an encrypted session; you should get a message indicating
896that @samp{DES} is being used to protect all traffic.
897
898@c 6
899@item If you wish, turn off non-CNS access.  You may want to
900restrict access to only those users who login via the CNS programs.  The
901Berkeley versions of @samp{rlogin}, @samp{rsh}, and @samp{rcp} rely on
902the return address of the incoming TCP connection for authentication, so
903they can be subverted by the use of IP source-address spoofing.  Turning
904them off increases your security against break-ins.  To do this, look for
905lines in @file{/etc/inetd.conf} for the services @samp{shell} and
906@samp{login}.  Comment them out by putting a @kbd{#} at the start of the
907line.  After editing @file{/etc/inetd.conf}, you must reset the
908@code{inetd} daemon as described above.
909
910@c 7
911@item If you wish, use the CNS @code{FTP} and/or @code{telnet}
912daemons instead of the system supplied daemons.  The CNS versions
913support both the traditional password authentication, and Kerberos
914authentication.  Look for lines in
915@file{/etc/inetd.conf} for the services @code{telnet} and @code{FTP}.
916Replace them with lines which look like this:
917
918@iftex
919@let@nonarrowing=@comment
920@end iftex
921@smallexample
922ftp    stream tcp nowait root /usr/kerberos/etc/ftpd    ftpd
923telnet stream tcp nowait root /usr/kerberos/etc/telnetd telnetd
924@end smallexample
925@iftex
926@let@nonarrowing=@relax
927@end iftex
928
929If you wish to restrict @code{FTP} access to people with valid CNS
930authentication (and to anonymous users, if your password file admits
931them), use the @samp{-a} option.  This rejects FTP accesses which would
932normally involve typing a password across the network unencrypted:
933
934@iftex
935@let@nonarrowing=@comment
936@end iftex
937@smallexample
938ftp    stream tcp nowait root /usr/kerberos/etc/ftpd    ftpd -a
939@end smallexample
940@iftex
941@let@nonarrowing=@relax
942@end iftex
943
944If you wish to restrict @code{telnet} access to people with valid CNS
945authentication, use the @samp{-a valid} option.  This rejects
946@code{telnet} connections that would normally involve typing a password
947across the network unencrypted:
948
949@iftex
950@let@nonarrowing=@comment
951@end iftex
952@smallexample
953telnet stream tcp nowait root /usr/kerberos/etc/telnetd
954    telnetd -a valid
955@end smallexample
956@iftex
957@let@nonarrowing=@relax
958@end iftex
959
960(The example above should be entered all on one line; it has been broken
961into two lines for convenience in reading this manual.)
962
963After editing @file{/etc/inetd.conf}, you must reset the @code{inetd}
964daemon as described above.
965@end enumerate
966
967@node Adding users,  , Application server configuration, Top
968@chapter Adding Users to the Kerberos Database
969
970Before users can use CNS, they must be added to the Kerberos database.
971
972Users are added with the @code{kadmin} program.
973
974@enumerate
975
976@item Log in as the user for whom you created an admin instance when
977you configured the Kerberos database (@pxref{Configuring the
978KDC,,Configuring the Key Distribution Center}).
979
980@item Run @code{/usr/kerberos/bin/kadmin}.
981
982@item At the prompt, type @kbd{ank @var{USER}}.  When prompted, enter
983your admin password, and then enter a password for the user.
984@smallexample
985% kadmin
986Welcome to the Kerberos Administration Program, version 2
987Type @kbd{help} if you need it.
988admin:  ank @var{USER}
989Admin password:
990    @emph{the admin password you created with kdb_edit}
991Password for @var{USER}: @emph{a password}
992Verifying, please re-enter
993    Password for @var{USER}: @emph{Re-enter.}
994@var{USER} added to database.
995admin:  quit
996%
997@end smallexample
998
999@item The user may now run @code{kinit}, giving the password you entered
1000above.  Encourage the user to use @code{kpasswd} to select a personal
1001password which you do not know.  If necessary, you can use the
1002@code{cpw} command in @code{kadmin} to change the user's password to a
1003known string.
1004@end enumerate
1005
1006@contents
1007@c second page break makes sure right-left page alignment works right
1008@c with a one-page toc, even though we don't have setchapternewpage odd.
1009@c end of texinfo file
1010@bye
Note: See TracBrowser for help on using the repository browser.