e0b428df20d1c859a1dd5c865d3d7bf56f674e75
[krb5.git] / doc / rst_source / krb_admins / admin_commands / kdb5_ldap_util.rst
1 .. _kdb5_ldap_util(8):
2
3 kdb5_ldap_util
4 ===============
5
6 SYNOPSIS
7 --------
8
9 .. _kdb5_ldap_util_synopsis:
10
11 **kdb5_ldap_util**
12 [**-D** *user_dn* [**-w** *passwd*]]
13 [**-H** *ldapuri*]
14 **command**
15 [*command_options*]
16
17 .. _kdb5_ldap_util_synopsis_end:
18
19 DESCRIPTION
20 -----------
21
22 kdb5_ldap_util allows an administrator to manage realms, Kerberos
23 services and ticket policies.
24
25 COMMAND-LINE OPTIONS
26 --------------------
27
28 .. _kdb5_ldap_util_options:
29
30 **-D** *user_dn*
31     Specifies the Distinguished Name (DN) of the user who has
32     sufficient rights to perform the operation on the LDAP server.
33
34 **-w** *passwd*
35     Specifies the password of *user_dn*.  This option is not
36     recommended.
37
38 **-H** *ldapuri*
39     Specifies the URI of the LDAP server.  It is recommended to use
40     ``ldapi://`` or ``ldaps://`` to connect to the LDAP server.
41
42 .. _kdb5_ldap_util_options_end:
43
44
45 COMMANDS
46 --------
47
48 create
49 ~~~~~~
50
51 .. _kdb5_ldap_util_create:
52
53     **create**
54     [**-subtrees** *subtree_dn_list*]
55     [**-sscope** *search_scope*]
56     [**-containerref** *container_reference_dn*]
57     [**-k** *mkeytype*]
58     [**-kv** *mkeyVNO*]
59     [**-m|-P** *password*\|\ **-sf** *stashfilename*]
60     [**-s**]
61     [**-r** *realm*]
62     [**-kdcdn** *kdc_service_list*]
63     [**-admindn** *admin_service_list*]
64     [**-maxtktlife** *max_ticket_life*]
65     [**-maxrenewlife** *max_renewable_ticket_life*]
66     [*ticket_flags*]
67
68 Creates realm in directory. Options:
69
70 **-subtrees** *subtree_dn_list*
71     Specifies the list of subtrees containing the principals of a
72     realm.  The list contains the DNs of the subtree objects separated
73     by colon (``:``).
74
75 **-sscope** *search_scope*
76     Specifies the scope for searching the principals under the
77     subtree.  The possible values are 1 or one (one level), 2 or sub
78     (subtrees).
79
80 **-containerref** *container_reference_dn*
81     Specifies the DN of the container object in which the principals
82     of a realm will be created.  If the container reference is not
83     configured for a realm, the principals will be created in the
84     realm container.
85
86 **-k** *mkeytype*
87     Specifies the key type of the master key in the database; the
88     default is that given in kdc.conf.
89
90 **-kv** *mkeyVNO*
91     Specifies the version number of the master key in the database;
92     the default is 1.  Note that 0 is not allowed.
93
94 **-m**
95     Specifies that the master database password should be read from
96     the TTY rather than fetched from a file on the disk.
97
98 **-P** *password*
99     Specifies the master database password. This option is not
100     recommended.
101
102 **-r** *realm*
103     Specifies the Kerberos realm of the database.
104
105 **-sf** *stashfilename*
106     Specifies the stash file of the master database password.
107
108 **-s**
109     Specifies that the stash file is to be created.
110
111 **-maxtktlife** *max_ticket_life*
112     Specifies maximum ticket life for principals in this realm.
113
114 **-maxrenewlife** *max_renewable_ticket_life*
115     Specifies maximum renewable life of tickets for principals in this
116     realm.
117
118 *ticket_flags*
119     Specifies the ticket flags.  If this option is not specified, by
120     default, none of the flags are set.  This means all the ticket
121     options will be allowed and no restriction will be set.
122
123     The various flags are:
124
125     {-\|+}\ **allow_postdated**
126         **-allow_postdated** prohibits this principal from obtaining
127         postdated tickets.  (Sets the **KRB5_KDB_DISALLOW_POSTDATED**
128         flag.)  **+allow_postdated** clears this flag.
129
130     {-\|+}\ **allow_forwardable**
131         **-allow_forwardable** prohibits this principal from obtaining
132         forwardable tickets.  (Sets the
133         **KRB5_KDB_DISALLOW_FORWARDABLE** flag.)
134         **+allow_forwardable** clears this flag.
135
136     {-\|+}\ **allow_renewable**
137         **-allow_renewable** prohibits this principal from obtaining
138         renewable tickets.  (Sets the **KRB5_KDB_DISALLOW_RENEWABLE**
139         flag.)  **+allow_renewable** clears this flag.
140
141     {-\|+}\ **allow_proxiable**
142         **-allow_proxiable** prohibits this principal from obtaining
143         proxiable tickets.  (Sets the **KRB5_KDB_DISALLOW_PROXIABLE**
144         flag.)  **+allow_proxiable** clears this flag.
145
146     {-\|+}\ **allow_dup_skey**
147         **-allow_dup_skey** disables user-to-user authentication for
148         this principal by prohibiting this principal from obtaining a
149         session key for another user.  (Sets the
150         **KRB5_KDB_DISALLOW_DUP_SKEY** flag.)  **+allow_dup_skey**
151         clears this flag.
152
153     {-\|+}\ **requires_preauth**
154         **+requires_preauth** requires this principal to
155         preauthenticate before being allowed to kinit.  (Sets the
156         **KRB5_KDB_REQUIRES_PRE_AUTH** flag.)  **-requires_preauth**
157         clears this flag.
158
159     {-\|+}\ **requires_hwauth**
160         **+requires_hwauth** requires this principal to
161         preauthenticate using a hardware device before being allowed
162         to kinit.  (Sets the **KRB5_KDB_REQUIRES_HW_AUTH** flag.)
163         **-requires_hwauth** clears this flag.
164
165     {-\|+}\ **allow_svr**
166         **-allow_svr** prohibits the issuance of service tickets for
167         this principal.  (Sets the **KRB5_KDB_DISALLOW_SVR** flag.)
168         **+allow_svr** clears this flag.
169
170     {-\|+}\ **allow_tgs_req**
171         **-allow_tgs_req** specifies that a Ticket-Granting Service
172         (TGS) request for a service ticket for this principal is not
173         permitted.  This option is useless for most things.
174         **+allow_tgs_req** clears this flag.  The default is
175         +allow_tgs_req.  In effect, **-allow_tgs_req sets** the
176         **KRB5_KDB_DISALLOW_TGT_BASED** flag on the principal in the
177         database.
178
179     {-\|+}\ **allow_tix**
180         **-allow_tix** forbids the issuance of any tickets for this
181         principal.  **+allow_tix** clears this flag.  The default is
182         **+allow_tix**.  In effect, **-allow_tix** sets the
183         **KRB5_KDB_DISALLOW_ALL_TIX** flag on the principal in the
184         database.
185
186     {-\|+}\ **needchange**
187         **+needchange** sets a flag in attributes field to force a
188         password change; **-needchange** clears it.  The default is
189         **-needchange**.  In effect, **+needchange** sets the
190         **KRB5_KDB_REQUIRES_PWCHANGE** flag on the principal in the
191         database.
192
193     {-\|+}\ **password_changing_service**
194         **+password_changing_service** sets a flag in the attributes
195         field marking this as a password change service principal
196         (useless for most things).  **-password_changing_service**
197         clears the flag.  This flag intentionally has a long name.
198         The default is **-password_changing_service**.  In effect,
199         **+password_changing_service** sets the
200         *KRB5_KDB_PWCHANGE_SERVICE* flag on the principal in the
201         database.
202
203 Command options specific to eDirectory:
204
205 .. _kdb5_ldap_util_create_edir:
206
207 **-kdcdn** *kdc_service_list*
208     Specifies the list of KDC service objects serving the realm.  The
209     list contains the DNs of the KDC service objects separated by
210     colon (``:``).
211
212 **-admindn** *admin_service_list*
213     Specifies the list of Administration service objects serving the
214     realm.  The list contains the DNs of the Administration service
215     objects separated by colon (``:``).
216
217 .. _kdb5_ldap_util_create_edir_end:
218
219 Example::
220
221     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu create -subtrees o=org -sscope SUB -r ATHENA.MIT.EDU
222     Password for "cn=admin,o=org":
223     Initializing database for realm 'ATHENA.MIT.EDU'
224     You will be prompted for the database Master Password.
225     It is important that you NOT FORGET this password.
226     Enter KDC database master key:
227     Re-enter KDC database master key to verify:
228
229 .. _kdb5_ldap_util_create_end:
230
231 modify
232 ~~~~~~
233
234 .. _kdb5_ldap_util_modify:
235
236     **modify**
237     [**-subtrees** *subtree_dn_list*]
238     [**-sscope** *search_scope*]
239     [**-containerref** *container_reference_dn*]
240     [**-r** *realm*]
241     [**-kdcdn** *kdc_service_list* | [**-clearkdcdn** *kdc_service_list*] [**-addkdcdn** *kdc_service_list*]]
242     [**-admindn** *admin_service_list* | [**-clearadmindn** *admin_service_list*] [**-addadmindn** *admin_service_list*]]
243     [**-maxtktlife** *max_ticket_life*]
244     [**-maxrenewlife** *max_renewable_ticket_life*]
245     [*ticket_flags*]
246
247 Modifies the attributes of a realm.  Options:
248
249 **-subtrees** *subtree_dn_list*
250
251     Specifies the list of subtrees containing the principals of a
252     realm.  The list contains the DNs of the subtree objects separated
253     by colon (``:``).  This list replaces the existing list.
254
255 **-sscope** *search_scope*
256     Specifies the scope for searching the principals under the
257     subtrees.  The possible values are 1 or one (one level), 2 or sub
258     (subtrees).
259
260 **-containerref** *container_reference_dn* Specifies the DN of the
261     container object in which the principals of a realm will be
262     created.
263
264 **-r** *realm*
265     Specifies the Kerberos realm of the database.
266
267 **-maxtktlife** *max_ticket_life*
268     Specifies maximum ticket life for principals in this realm.
269
270 **-maxrenewlife** *max_renewable_ticket_life*
271     Specifies maximum renewable life of tickets for principals in this
272     realm.
273
274 *ticket_flags*
275     Specifies the ticket flags. If this option is not specified, by
276     default, none of the flags are set.  This means all the ticket
277     options will be allowed and no restriction will be set.
278
279     The various flags are:
280
281     {-\|+}\ **allow_postdated**
282         **-allow_postdated** prohibits this principal from obtaining
283         postdated tickets.  (Sets the **KRB5_KDB_DISALLOW_POSTDATED**
284         flag.)  **+allow_postdated** clears this flag.
285
286     {-\|+}\ **allow_forwardable**
287         **-allow_forwardable** prohibits this principal from obtaining
288         forwardable tickets.  (Sets the
289         **KRB5_KDB_DISALLOW_FORWARDABLE** flag.)
290         **+allow_forwardable** clears this flag.
291
292     {-\|+}\ **allow_renewable**
293         **-allow_renewable** prohibits this principal from obtaining
294         renewable tickets.  (Sets the **KRB5_KDB_DISALLOW_RENEWABLE**
295         flag.)  **+allow_renewable** clears this flag.
296
297     {-\|+}\ **allow_proxiable**
298         **-allow_proxiable** prohibits this principal from obtaining
299         proxiable tickets.  (Sets the **KRB5_KDB_DISALLOW_PROXIABLE**
300         flag.)  **+allow_proxiable** clears this flag.
301
302     {-\|+}\ **allow_dup_skey**
303         **-allow_dup_skey** disables user-to-user authentication for
304         this principal by prohibiting this principal from obtaining a
305         session key for another user.  (Sets the
306         **KRB5_KDB_DISALLOW_DUP_SKEY** flag.)  **+allow_dup_skey**
307         clears this flag.
308
309     {-\|+}\ **requires_preauth**
310         **+requires_preauth** requires this principal to
311         preauthenticate before being allowed to kinit.  (Sets the
312         **KRB5_KDB_REQUIRES_PRE_AUTH** flag.)  **-requires_preauth**
313         clears this flag.
314
315     {-\|+}\ **requires_hwauth**
316         **+requires_hwauth** requires this principal to
317         preauthenticate using a hardware device before being allowed
318         to kinit.  (Sets the **KRB5_KDB_REQUIRES_HW_AUTH** flag.)
319         **-requires_hwauth** clears this flag.
320
321     {-\|+}\ **allow_svr**
322         **-allow_svr** prohibits the issuance of service tickets for
323         this principal.  (Sets the **KRB5_KDB_DISALLOW_SVR** flag.)
324         **+allow_svr** clears this flag.
325
326     {-\|+}\ **allow_tgs_req**
327         **-allow_tgs_req** specifies that a Ticket-Granting Service
328         (TGS) request for a service ticket for this principal is not
329         permitted.  This option is useless for most things.
330         **+allow_tgs_req** clears this flag.  The default is
331         +allow_tgs_req.  In effect, **-allow_tgs_req sets** the
332         **KRB5_KDB_DISALLOW_TGT_BASED** flag on the principal in the
333         database.
334
335     {-\|+}\ **allow_tix**
336         **-allow_tix** forbids the issuance of any tickets for this
337         principal.  **+allow_tix** clears this flag.  The default is
338         **+allow_tix**.  In effect, **-allow_tix** sets the
339         **KRB5_KDB_DISALLOW_ALL_TIX** flag on the principal in the
340         database.
341
342     {-\|+}\ **needchange**
343         **+needchange** sets a flag in attributes field to force a
344         password change; **-needchange** clears it.  The default is
345         **-needchange**.  In effect, **+needchange** sets the
346         **KRB5_KDB_REQUIRES_PWCHANGE** flag on the principal in the
347         database.
348
349     {-\|+}\ **password_changing_service**
350         **+password_changing_service** sets a flag in the attributes
351         field marking this as a password change service principal
352         (useless for most things).  **-password_changing_service**
353         clears the flag.  This flag intentionally has a long name.
354         The default is **-password_changing_service**.  In effect,
355         **+password_changing_service** sets the
356         *KRB5_KDB_PWCHANGE_SERVICE* flag on the principal in the
357         database.
358
359 Command options specific to eDirectory:
360
361 .. _kdb5_ldap_util_modify_edir:
362
363 **-kdcdn** *kdc_service_list*
364     Specifies the list of KDC service objects serving the realm.  The
365     list contains the DNs of the KDC service objects separated by a
366     colon (``:``).  This list replaces the existing list.
367
368 **-clearkdcdn** *kdc_service_list*
369     Specifies the list of KDC service objects that need to be removed
370     from the existing list.  The list contains the DNs of the KDC
371     service objects separated by a colon (``:``).
372
373 **-addkdcdn** *kdc_service_list*
374     Specifies the list of KDC service objects that need to be added to
375     the existing list.  The list contains the DNs of the KDC service
376     objects separated by a colon (``:``).
377
378 **-admindn** *admin_service_list*
379     Specifies the list of Administration service objects serving the
380     realm.  The list contains the DNs of the Administration service
381     objects separated by a colon (``:``).  This list replaces the
382     existing list.
383
384 **-clearadmindn** *admin_service_list*
385     Specifies the list of Administration service objects that need to
386     be removed from the existing list.  The list contains the DNs of
387     the Administration service objects separated by a colon (``:``).
388
389 **-addadmindn** *admin_service_list*
390     Specifies the list of Administration service objects that need to
391     be added to the existing list.  The list contains the DNs of the
392     Administration service objects separated by a colon (``:``).
393
394 .. _kdb5_ldap_util_modify_edir_end:
395
396 Example::
397
398     shell% kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu modify +requires_preauth -r ATHENA.MIT.EDU
399     Password for "cn=admin,o=org":
400     shell%
401
402 .. _kdb5_ldap_util_modify_end:
403
404 view
405 ~~~~
406
407 .. _kdb5_ldap_util_view:
408
409     **view** [**-r** *realm*]
410
411 Displays the attributes of a realm.  Options:
412
413 **-r** *realm*
414     Specifies the Kerberos realm of the database.
415
416 EXAMPLE::
417
418     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu view -r ATHENA.MIT.EDU
419     Password for "cn=admin,o=org":
420     Realm Name: ATHENA.MIT.EDU
421     Subtree: ou=users,o=org
422     Subtree: ou=servers,o=org
423     SearchScope: ONE
424     Maximum ticket life: 0 days 01:00:00
425     Maximum renewable life: 0 days 10:00:00
426     Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
427
428 .. _kdb5_ldap_util_view_end:
429
430 destroy
431 ~~~~~~~
432
433 .. _kdb5_ldap_util_destroy:
434
435     **destroy** [**-f**] [**-r** *realm*]
436
437 Destroys an existing realm. Options:
438
439 **-f**
440     If specified, will not prompt the user for confirmation.
441
442 **-r** *realm*
443     Specifies the Kerberos realm of the database.
444
445 EXAMPLE::
446
447     shell% kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu destroy -r ATHENA.MIT.EDU
448     Password for "cn=admin,o=org":
449     Deleting KDC database of 'ATHENA.MIT.EDU', are you sure?
450     (type 'yes' to confirm)? yes
451     OK, deleting database of 'ATHENA.MIT.EDU'...
452     shell%
453
454 .. _kdb5_ldap_util_destroy_end:
455
456 list
457 ~~~~
458
459 .. _kdb5_ldap_util_list:
460
461     **list**
462
463 Lists the name of realms.
464
465 EXAMPLE::
466
467     shell% kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu list
468     Password for "cn=admin,o=org":
469     ATHENA.MIT.EDU
470     OPENLDAP.MIT.EDU
471     MEDIA-LAB.MIT.EDU
472     shell%
473
474 .. _kdb5_ldap_util_list_end:
475
476 stashsrvpw
477 ~~~~~~~~~~
478
479 .. _kdb5_ldap_util_stashsrvpw:
480
481     **stashsrvpw**
482     [**-f** *filename*]
483     *servicedn*
484
485 Allows an administrator to store the password for service object in a
486 file so that KDC and Administration server can use it to authenticate
487 to the LDAP server.  Options:
488
489 **-f** *filename*
490     Specifies the complete path of the service password file. By
491     default, ``/usr/local/var/service_passwd`` is used.
492
493 *servicedn*
494     Specifies Distinguished Name (DN) of the service object whose
495     password is to be stored in file.
496
497 EXAMPLE::
498
499     kdb5_ldap_util stashsrvpw -f /home/andrew/conf_keyfile cn=service-kdc,o=org
500     Password for "cn=service-kdc,o=org":
501     Re-enter password for "cn=service-kdc,o=org":
502
503 .. _kdb5_ldap_util_stashsrvpw_end:
504
505 create_policy
506 ~~~~~~~~~~~~~
507
508 .. _kdb5_ldap_util_create_policy:
509
510     **create_policy**
511     [**-r** *realm*]
512     [**-maxtktlife** *max_ticket_life*]
513     [**-maxrenewlife** *max_renewable_ticket_life*]
514     [*ticket_flags*]
515     *policy_name*
516
517 Creates a ticket policy in directory. Options:
518
519 **-r** *realm*
520     Specifies the Kerberos realm of the database.
521
522 **-maxtktlife** *max_ticket_life*
523     Specifies maximum ticket life for principals.
524
525 **-maxrenewlife** *max_renewable_ticket_life*
526     Specifies maximum renewable life of tickets for principals.
527
528 *ticket_flags*
529     Specifies the ticket flags. If this option is not specified, by
530     default, none of the flags are set.  This means all the ticket
531     options will be allowed and no restriction will be set.
532
533     The various flags are:
534
535     {-\|+}\ **allow_postdated**
536         **-allow_postdated** prohibits this principal from obtaining
537         postdated tickets.  (Sets the **KRB5_KDB_DISALLOW_POSTDATED**
538         flag.)  **+allow_postdated** clears this flag.
539
540     {-\|+}\ **allow_forwardable**
541         **-allow_forwardable** prohibits this principal from obtaining
542         forwardable tickets.  (Sets the
543         **KRB5_KDB_DISALLOW_FORWARDABLE** flag.)
544         **+allow_forwardable** clears this flag.
545
546     {-\|+}\ **allow_renewable**
547         **-allow_renewable** prohibits this principal from obtaining
548         renewable tickets.  (Sets the **KRB5_KDB_DISALLOW_RENEWABLE**
549         flag.)  **+allow_renewable** clears this flag.
550
551     {-\|+}\ **allow_proxiable**
552         **-allow_proxiable** prohibits this principal from obtaining
553         proxiable tickets.  (Sets the **KRB5_KDB_DISALLOW_PROXIABLE**
554         flag.)  **+allow_proxiable** clears this flag.
555
556     {-\|+}\ **allow_dup_skey**
557         **-allow_dup_skey** disables user-to-user authentication for
558         this principal by prohibiting this principal from obtaining a
559         session key for another user.  (Sets the
560         **KRB5_KDB_DISALLOW_DUP_SKEY** flag.)  **+allow_dup_skey**
561         clears this flag.
562
563     {-\|+}\ **requires_preauth**
564         **+requires_preauth** requires this principal to
565         preauthenticate before being allowed to kinit.  (Sets the
566         **KRB5_KDB_REQUIRES_PRE_AUTH** flag.)  **-requires_preauth**
567         clears this flag.
568
569     {-\|+}\ **requires_hwauth**
570         **+requires_hwauth** requires this principal to
571         preauthenticate using a hardware device before being allowed
572         to kinit.  (Sets the **KRB5_KDB_REQUIRES_HW_AUTH** flag.)
573         **-requires_hwauth** clears this flag.
574
575     {-\|+}\ **allow_svr**
576         **-allow_svr** prohibits the issuance of service tickets for
577         this principal.  (Sets the **KRB5_KDB_DISALLOW_SVR** flag.)
578         **+allow_svr** clears this flag.
579
580     {-\|+}\ **allow_tgs_req**
581         **-allow_tgs_req** specifies that a Ticket-Granting Service
582         (TGS) request for a service ticket for this principal is not
583         permitted.  This option is useless for most things.
584         **+allow_tgs_req** clears this flag.  The default is
585         +allow_tgs_req.  In effect, **-allow_tgs_req sets** the
586         **KRB5_KDB_DISALLOW_TGT_BASED** flag on the principal in the
587         database.
588
589     {-\|+}\ **allow_tix**
590         **-allow_tix** forbids the issuance of any tickets for this
591         principal.  **+allow_tix** clears this flag.  The default is
592         **+allow_tix**.  In effect, **-allow_tix** sets the
593         **KRB5_KDB_DISALLOW_ALL_TIX** flag on the principal in the
594         database.
595
596     {-\|+}\ **needchange**
597         **+needchange** sets a flag in attributes field to force a
598         password change; **-needchange** clears it.  The default is
599         **-needchange**.  In effect, **+needchange** sets the
600         **KRB5_KDB_REQUIRES_PWCHANGE** flag on the principal in the
601         database.
602
603     {-\|+}\ **password_changing_service**
604         **+password_changing_service** sets a flag in the attributes
605         field marking this as a password change service principal
606         (useless for most things).  **-password_changing_service**
607         clears the flag.  This flag intentionally has a long name.
608         The default is **-password_changing_service**.  In effect,
609         **+password_changing_service** sets the
610         *KRB5_KDB_PWCHANGE_SERVICE* flag on the principal in the
611         database.
612
613 *policy_name*
614     Specifies the name of the ticket policy.
615
616 EXAMPLE::
617
618     kdb5_ldap_util  -D  cn=admin,o=org -H ldaps://ldap-server1.mit.edu create_policy -r ATHENA.MIT.EDU -maxtktlife "1 day" -maxrenewlife "1 week" -allow_postdated +needchange -allow_forwardable tktpolicy
619     Password for "cn=admin,o=org":
620
621 .. _kdb5_ldap_util_create_policy_end:
622
623 modify_policy
624 ~~~~~~~~~~~~~
625
626 .. _kdb5_ldap_util_modify_policy:
627
628     **modify_policy**
629     [**-r** *realm*]
630     [**-maxtktlife** *max_ticket_life*]
631     [**-maxrenewlife** *max_renewable_ticket_life*]
632     [*ticket_flags*]
633     *policy_name*
634
635 Modifies the attributes of a ticket policy.  Options are same as
636 create_policy.
637
638 **-r** *realm*
639     Specifies the Kerberos realm of the database.
640
641 Example::
642
643     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu modify_policy  -r  ATHENA.MIT.EDU  -maxtktlife  "60  minutes"  -maxrenewlife  "10  hours" +allow_postdated -requires_preauth tktpolicy
644     Password for "cn=admin,o=org":
645
646 .. _kdb5_ldap_util_modify_policy_end:
647
648 view_policy
649 ~~~~~~~~~~~
650
651 .. _kdb5_ldap_util_view_policy:
652
653     **view_policy**
654     [**-r** *realm*]
655     *policy_name*
656
657 Displays the attributes of a ticket policy. Options:
658
659 *policy_name*
660     Specifies the name of the ticket policy.
661
662 EXAMPLE::
663
664     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu view_policy -r ATHENA.MIT.EDU tktpolicy
665     Password for "cn=admin,o=org":
666     Ticket policy: tktpolicy
667     Maximum ticket life: 0 days 01:00:00
668     Maximum renewable life: 0 days 10:00:00
669     Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
670
671 .. _kdb5_ldap_util_view_policy_end:
672
673 destroy_policy
674 ~~~~~~~~~~~~~~
675
676 .. _kdb5_ldap_util_destroy_policy:
677
678     **destroy_policy**
679     [**-r** *realm*]
680     [**-force**]
681     *policy_name*
682
683 Destroys an existing ticket policy. Options:
684
685 **-r** *realm*
686     Specifies the Kerberos realm of the database.
687
688 **-force**
689     Forces the deletion of the policy object.  If not specified, will
690     be prompted for confirmation while deleting the policy.  Enter yes
691     to confirm the deletion.
692
693 *policy_name*
694     Specifies the name of the ticket policy.
695
696 Example::
697
698     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu destroy_policy -r ATHENA.MIT.EDU tktpolicy
699     Password for "cn=admin,o=org":
700     This will delete the policy object 'tktpolicy', are you sure?
701     (type 'yes' to confirm)? yes
702     ** policy object 'tktpolicy' deleted.
703
704 .. _kdb5_ldap_util_destroy_policy_end:
705
706 list_policy
707 ~~~~~~~~~~~
708
709 .. _kdb5_ldap_util_list_policy:
710
711     **list_policy**
712     [**-r** *realm*]
713
714 Lists the ticket policies in realm if specified or in the default
715 realm.  Options:
716
717 **-r** *realm*
718     Specifies the Kerberos realm of the database.
719
720 Example::
721
722     kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu list_policy -r ATHENA.MIT.EDU
723     Password for "cn=admin,o=org":
724     tktpolicy
725     tmppolicy
726     userpolicy
727
728 .. _kdb5_ldap_util_list_policy_end:
729
730
731 Commands specific to eDirectory
732 -------------------------------
733
734 setsrvpw
735 ~~~~~~~~
736
737 .. _kdb5_ldap_util_setsrvpw:
738
739     **setsrvpw**
740     [**-randpw\|-fileonly**]
741     [**-f** *filename*]
742     *service_dn*
743
744 Allows an administrator to set password for service objects such as
745 KDC and Administration server in eDirectory and store them in a file.
746 The **-fileonly** option stores the password in a file and not in the
747 eDirectory object. Options:
748
749 **-randpw**
750     Generates and sets a random password.  This options can be
751     specified to store the password both in eDirectory and a file.
752     The **-fileonly** option can not be used if **-randpw** option is
753     already specified.
754
755 **-fileonly**
756     Stores the password only in a file and not in eDirectory.  The
757     **-randpw** option can not be used when **-fileonly** options is
758     specified.
759
760 **-f** *filename*
761     Specifies complete path of the service password file.  By default,
762     ``/usr/local/var/service_passwd`` is used.
763
764 *service_dn*
765     Specifies Distinguished Name (DN) of the service object whose
766     password is to be set.
767
768 Example::
769
770     kdb5_ldap_util setsrvpw -D cn=admin,o=org setsrvpw -fileonly -f /home/andrew/conf_keyfile cn=service-kdc,o=org
771     Password for "cn=admin,o=org":
772     Password for "cn=service-kdc,o=org":
773     Re-enter password for "cn=service-kdc,o=org":
774
775 .. _kdb5_ldap_util_setsrvpw_end:
776
777 create_service
778 ~~~~~~~~~~~~~~
779
780 .. _kdb5_ldap_util_create_service:
781
782     **create_service**
783     {**-kdc**\|\ **-admin**\|\ **-pwd**}
784     [**-servicehost** *service_host_list*]
785     [**-realm** *realm_list*]
786     [**-randpw**\|\ **-fileonly**]
787     [**-f** *filename*]
788     *service_dn*
789
790 Creates a service in directory and assigns appropriate rights. Options:
791
792 **-kdc**
793     Specifies the service is a KDC service
794
795 **-admin**
796    Specifies the service is a Administration service
797
798 **-pwd**
799     Specifies the Password service
800
801 **-servicehost** *service_host_list*
802     Specifies the list of entries separated by a colon (``:``).  Each
803     entry consists of the hostname or IP address of the server hosting
804     the service, transport protocol, and the port number of the
805     service separated by a pound sign (``#``).  For example,
806     ``server1#tcp#88:server2#udp#89``.
807
808 **-realm** *realm_list*
809     Specifies the list of realms that are to be associated with this
810     service.  The list contains the name of the realms separated by a
811     colon (``:``).
812
813 **-randpw**
814     Generates and sets a random password.  This option is used to set
815     the random password for the service object in directory and also
816     to store it in the file.  The **-fileonly** option can not be used
817     if **-randpw** option is specified.
818
819 **-fileonly**
820     Stores the password only in a file and not in eDirectory.  The
821     **-randpw** option can not be used when **-fileonly** option is
822     specified.
823
824 **-f** *filename*
825     Specifies the complete path of the file where the service object
826     password is stashed.
827
828 *service_dn*
829     Specifies Distinguished Name (DN) of the Kerberos service to be
830     created.
831
832 Example::
833
834     shell% kdb5_ldap_util -D cn=admin,o=org create_service -kdc -randpw -f /home/andrew/conf_keyfile cn=service-kdc,o=org
835     Password for "cn=admin,o=org":
836     File does not exist. Creating the file /home/andrew/conf_keyfile...
837     shell%
838
839 .. _kdb5_ldap_util_create_service_end:
840
841 modify_service
842 ~~~~~~~~~~~~~~
843
844 .. _kdb5_ldap_util_modify_service:
845
846    **modify_service**
847    [**-servicehost** *service_host_list* |
848    [**-clearservicehost** *service_host_list*]
849    [**-addservicehost** *service_host_list*]]
850    [**-realm** *realm_list* |
851    [**-clearrealm** *realm_list*]
852    [**-addrealm** *realm_list*]]
853    *service_dn*
854
855 Modifies the attributes of a service and assigns appropriate
856 rights.  Options:
857
858 **-servicehost** *service_host_list*
859     Specifies the list of entries separated by a colon (``:``).  Each
860     entry consists of a host name or IP Address of the Server hosting
861     the service, transport protocol, and port number of the service
862     separated by a pound sign (``#``).  For example,
863     ``server1#tcp#88:server2#udp#89``.
864
865 **-clearservicehost** *service_host_list*
866     Specifies the list of servicehost entries to be removed from the
867     existing list separated by colon (``:``).  Each entry consists of
868     a host name or IP Address of the server hosting the service,
869     transport protocol, and port number of the service separated by a
870     pound sign (``#``).
871
872 **-addservicehost** *service_host_list*
873     Specifies the list of servicehost entries to be added to the
874     existing list separated by colon (``:``).  Each entry consists of
875     a host name or IP Address of the server hosting the service,
876     transport protocol, and port number of the service separated by a
877     pound sign (``#``).
878
879 **-realm** *realm_list*
880     Specifies the list of realms that are to be associated with this
881     service.  The list contains the name of the realms separated by a
882     colon (``:``).  This list replaces the existing list.
883
884 **-clearrealm** *realm_list*
885     Specifies the list of realms to be removed from the existing list.
886     The list contains the name of the realms separated by a colon
887     (``:``).
888
889 **-addrealm** *realm_list*
890     Specifies the list of realms to be added to the existing list.
891     The list contains the name of the realms separated by a colon
892     (``:``).
893
894 *service_dn*
895     Specifies Distinguished Name (DN) of the Kerberos service to be
896     modified.
897
898 Example::
899
900     shell% kdb5_ldap_util -D cn=admin,o=org modify_service -realm ATHENA.MIT.EDU cn=service-kdc,o=org
901     Password for "cn=admin,o=org":
902     Changing rights for the service object. Please wait ... done
903     shell%
904
905 .. _kdb5_ldap_util_modify_service_end:
906
907 view_service
908 ~~~~~~~~~~~~
909
910 .. _kdb5_ldap_util_view_service:
911
912     **view_service** *service_dn*
913
914 Displays the attributes of a service.  Options:
915
916 *service_dn*
917     Specifies Distinguished Name (DN) of the Kerberos service to be
918     viewed.
919
920 Example::
921
922     shell% kdb5_ldap_util -D cn=admin,o=org view_service cn=service-kdc,o=org
923     Password for "cn=admin,o=org":
924     Service dn: cn=service-kdc,o=org
925     Service type: kdc
926     Service host list:
927     Realm DN list: cn=ATHENA.MIT.EDU,cn=Kerberos,cn=Security
928     shell%
929
930 .. _kdb5_ldap_util_view_service_end:
931
932 destroy_service
933 ~~~~~~~~~~~~~~~
934
935 .. _kdb5_ldap_util_destroy_service:
936
937     **destroy_service**
938     [**-force**]
939     [**-f** *stashfilename*]
940     *service_dn*
941
942 Destroys an existing service.  Options:
943
944 **-force**
945     If specified, will not prompt for user's confirmation, instead
946     will force destruction of the service.
947
948 **-f** *stashfilename*
949     Specifies the complete path of the service password file from
950     where the entry corresponding to the service_dn needs to be
951     removed.
952
953 *service_dn*
954     Specifies Distinguished Name (DN) of the Kerberos service to be
955     destroyed.
956
957 EXAMPLE::
958
959     shell% kdb5_ldap_util -D cn=admin,o=org destroy_service cn=service-kdc,o=org
960     Password for "cn=admin,o=org":
961     This will delete the service object 'cn=service-kdc,o=org', are you sure?
962     (type 'yes' to confirm)? yes
963     ** service object 'cn=service-kdc,o=org' deleted.
964     shell%
965
966 .. _kdb5_ldap_util_destroy_service_end:
967
968 list_service
969 ~~~~~~~~~~~~
970
971 .. _kdb5_ldap_util_list_service:
972
973     **list_service** [**-basedn** *base_dn*]
974
975 Lists the name of services under a given base in directory.  Options:
976
977 **-basedn** *base_dn*
978     Specifies the base DN for searching the service objects, limiting
979     the search to a particular subtree.  If this option is not
980     provided, LDAP Server specific search base will be used.  For eg,
981     in the case of OpenLDAP, value of defaultsearchbase from
982     slapd.conf file will be used, where as in the case of eDirectory,
983     the default value for the base DN is Root.
984
985 EXAMPLE::
986
987     shell% kdb5_ldap_util -D cn=admin,o=org list_service
988     Password for "cn=admin,o=org":
989     cn=service-kdc,o=org
990     cn=service-adm,o=org
991     cn=service-pwd,o=org
992     shell%
993
994 .. _kdb5_ldap_util_list_service_end:
995
996
997 SEE ALSO
998 --------
999
1000 kadmin(8)