Consolidate password and ticket management docs
[krb5.git] / doc / rst_source / krb_users / pwd_mgmt.rst
1 Password management
2 ===================
3
4 .. note:: This document was copied from **Kerberos V5 UNIX User's
5           Guide**.  Currently it is under review.  Please, send your
6           feedback, corrections and additions to krb5-bugs@mit.edu.
7           Your contribution is greatly appreciated.
8
9 Your password is the only way Kerberos has of verifying your identity.
10 If someone finds out your password, that person can masquerade as
11 you--send email that comes from you, read, edit, or delete your files,
12 or log into other hosts as you--and no one will be able to tell the
13 difference.  For this reason, it is important that you choose a good
14 password, and keep it secret.  If you need to give access to your
15 account to someone else, you can do so through Kerberos (see
16 :ref:`grant_access`).  You should never tell your password to anyone,
17 including your system administrator, for any reason.  You should
18 change your password frequently, particularly any time you think
19 someone may have found out what it is.
20
21
22 Changing your password
23 ----------------------
24
25 To change your Kerberos password, use the :ref:`kpasswd(1)` command.
26 It will ask you for your old password (to prevent someone else from
27 walking up to your computer when you're not there and changing your
28 password), and then prompt you for the new one twice.  (The reason you
29 have to type it twice is to make sure you have typed it correctly.)
30 For example, user ``david`` would do the following::
31
32     shell% kpasswd
33     Password for david:    <- Type your old password.
34     Enter new password:    <- Type your new password.
35     Enter it again:  <- Type the new password again.
36     Password changed.
37     shell%
38
39 If ``david`` typed the incorrect old password, he would get the
40 following message::
41
42     shell% kpasswd
43     Password for david:  <- Type the incorrect old password.
44     kpasswd: Password incorrect while getting initial ticket
45     shell%
46
47 If you make a mistake and don't type the new password the same way
48 twice, kpasswd will ask you to try again::
49
50     shell% kpasswd
51     Password for david:  <- Type the old password.
52     Enter new password:  <- Type the new password.
53     Enter it again: <- Type a different new password.
54     kpasswd: Password mismatch while reading password
55     shell%
56
57 Once you change your password, it takes some time for the change to
58 propagate through the system.  Depending on how your system is set up,
59 this might be anywhere from a few minutes to an hour or more.  If you
60 need to get new Kerberos tickets shortly after changing your password,
61 try the new password.  If the new password doesn't work, try again
62 using the old one.
63
64
65 .. _grant_access:
66
67 Granting access to your account
68 -------------------------------
69
70 If you need to give someone access to log into your account, you can
71 do so through Kerberos, without telling the person your password.
72 Simply create a file called :ref:`.k5login(5)` in your home directory.
73 This file should contain the Kerberos principal of each person to whom
74 you wish to give access.  Each principal must be on a separate line.
75 Here is a sample .k5login file::
76
77     jennifer@ATHENA.MIT.EDU
78     david@EXAMPLE.COM
79
80 This file would allow the users ``jennifer`` and ``david`` to use your
81 user ID, provided that they had Kerberos tickets in their respective
82 realms.  If you will be logging into other hosts across a network, you
83 will want to include your own Kerberos principal in your .k5login file
84 on each of these hosts.
85
86 Using a .k5login file is much safer than giving out your password,
87 because:
88
89 * You can take access away any time simply by removing the principal
90   from your .k5login file.
91
92 * Although the user has full access to your account on one particular
93   host (or set of hosts if your .k5login file is shared, e.g., over
94   NFS), that user does not inherit your network privileges.
95
96 * Kerberos keeps a log of who obtains tickets, so a system
97   administrator could find out, if necessary, who was capable of using
98   your user ID at a particular time.
99
100 One common application is to have a .k5login file in root's home
101 directory, giving root access to that machine to the Kerberos
102 principals listed.  This allows system administrators to allow users
103 to become root locally, or to log in remotely as root, without their
104 having to give out the root password, and without anyone having to
105 type the root password over the network.
106
107
108 Password quality verification
109 -----------------------------
110
111 TODO