~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to doc/rst_source/krb_admins/database/db_princs/modify_princ.rst

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _add_mod_del_princs_label:
 
2
 
 
3
Adding, modifying and deleting principals
 
4
============================================
 
5
 
 
6
To add a principal to the database, use the *kadmin* **add_principal** command.
 
7
 
 
8
To modify attributes of a principal, use the *kadmin* **modify_principal** command.
 
9
 
 
10
To delete a principal, use the *kadmin* **delete_principal** command.
 
11
 
 
12
 
 
13
.. include:: ../../admin_commands/kadmin_local.rst
 
14
   :start-after:  _add_principal:
 
15
   :end-before: _add_principal_end:
 
16
 
 
17
.. include:: ../../admin_commands/kadmin_local.rst
 
18
   :start-after:  _modify_principal:
 
19
   :end-before: _modify_principal_end:
 
20
 
 
21
.. include:: ../../admin_commands/kadmin_local.rst
 
22
   :start-after:  _delete_principal:
 
23
   :end-before: _delete_principal_end:
 
24
 
 
25
 
 
26
EXAMPLES
 
27
     
 
28
If you want to create a principal which is contained by a LDAP object, all you need to do is::
 
29
 
 
30
     kadmin: addprinc -x dn=cn=jennifer,dc=example,dc=com jennifer
 
31
     WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU";
 
32
     defaulting to no policy.
 
33
     Enter password for principal jennifer@ATHENA.MIT.EDU:  <= Type the password.
 
34
     Re-enter password for principal jennifer@ATHENA.MIT.EDU:  <=Type it again.
 
35
     Principal "jennifer@ATHENA.MIT.EDU" created.
 
36
     kadmin:
 
37
     
 
38
If you want to create a principal under a specific LDAP container and link to an existing LDAP object, all you need to do is::
 
39
 
 
40
     kadmin: addprinc -x containerdn=dc=example,dc=com -x linkdn=cn=david,dc=example,dc=com david
 
41
     WARNING: no policy specified for "david@ATHENA.MIT.EDU";
 
42
     defaulting to no policy.
 
43
     Enter password for principal david@ATHENA.MIT.EDU:  <= Type the password.
 
44
     Re-enter password for principal david@ATHENA.MIT.EDU:  <=Type it again.
 
45
     Principal "david@ATHENA.MIT.EDU" created.
 
46
     kadmin:
 
47
     
 
48
If you want to associate a ticket policy to a principal, all you need to do is::
 
49
 
 
50
     kadmin: modprinc -x tktpolicy=userpolicy david
 
51
     Principal "david@ATHENA.MIT.EDU" modified.
 
52
     kadmin:
 
53
     
 
54
If, on the other hand, you want to set up an account that expires on January 1, 2000, that uses a policy called "stduser", with a temporary password (which you want the user to change immediately), you would type the following::
 
55
 
 
56
     
 
57
     kadmin: addprinc david -expire "1/1/2000 12:01am EST" -policy stduser +needchange
 
58
     Enter password for principal david@ATHENA.MIT.EDU:  <= Type the password.
 
59
     Re-enter password for principal
 
60
     david@ATHENA.MIT.EDU:  <= Type it again.
 
61
     Principal "david@ATHENA.MIT.EDU" created.
 
62
     kadmin:
 
63
     
 
64
If you need cross-realm authentication, you will need to add principals for the other realm's TGT to each realm. For example, if you need to do cross-realm authentication between the realms *ATHENA.MIT.EDU* and *EXAMPLE.COM*, you would need to add the principals *krbtgt\/EXAMPLE.COM\@ATHENA.MIT.EDU* and *krbtgt\/ATHENA.MIT.EDU\@EXAMPLE.COM* to both databases. You need to be sure the passwords and the key version numbers (*kvno*) are the same in both databases. This may require explicitly setting the *kvno* with the *-kvno* option. See :ref:`xrealm_authn_label` for more details.
 
65
 
 
66
If you want to delete a principal ::
 
67
 
 
68
     kadmin: delprinc jennifer
 
69
     Are you sure you want to delete the principal
 
70
     "jennifer@ATHENA.MIT.EDU"? (yes/no): yes
 
71
     Principal "jennifer@ATHENA.MIT.EDU" deleted.
 
72
     Make sure that you have removed this principal from
 
73
     all ACLs before reusing.
 
74
     kadmin:
 
75
 
 
76
 
 
77
------------
 
78
 
 
79
Feedback:
 
80
 
 
81
Please, provide your feedback at krb5-bugs@mit.edu?subject=Documentation___db_princs
 
82
 
 
83