1kdb5_ldap_util(1M) System Administration Commands kdb5_ldap_util(1M)
2
3
4
6 kdb5_ldap_util - Kerberos configuration utility
7
9 kdb5_ldap_util [-D user_dn [-w passwd]] [-H ldap_uri] command
10 [command_options]
11
12
14 The kdb5_ldap_util utility allows an administrator to manage realms,
15 Kerberos services, and ticket policies. The utility offers a set of
16 general options, described under OPTIONS, and a set of commands, which,
17 in turn, have their own options. Commands and their options are
18 described in their own subsections, below.
19
21 kdb5_ldap_util has a small set of general options that apply to the
22 kdb5_ldap_util utility itself and a larger number of options that apply
23 to specific commands. A number of these command-specific options apply
24 to multiple commands and are described in their own section, below.
25
26 General Options
27 The following general options are supported:
28
29 -D user_dn
30
31 Specifies the distinguished name (DN) of a user who has sufficient
32 rights to perform the operation on the LDAP server.
33
34
35 -H ldap_uri
36
37 Specifies the URI of the LDAP server.
38
39
40 -w passwd
41
42 Specifies the password of user_dn. This option is not recommended.
43
44
45 Common Command-specific Options
46 The following options apply to a number of kdb5_ldap_util commands.
47
48 -subtrees subtree_dn_list
49
50 Specifies the list of subtrees containing the principals of a
51 realm. The list contains the DNs of the subtree objects separated
52 by a colon.
53
54
55 -sscope search_scope
56
57 Specifies the scope for searching the principals under a subtree.
58 The possible values are 1 or one (one level), 2 or sub (subtrees).
59
60
61 -containerref container_reference_dn
62
63 Specifies the DN of the container object in which the principals of
64 a realm will be created. If the container reference is not config‐
65 ured for a realm, the principals will be created in the realm con‐
66 tainer.
67
68
69 -maxtktlife max_ticket_life
70
71 Specifies maximum ticket life for principals in this realm.
72
73
74 -maxrenewlife max_renewable_ticket_life
75
76 Specifies maximum renewable life of tickets for principals in this
77 realm.
78
79
80 -r realm
81
82 Specifies the Kerberos realm of the database; by default the realm
83 returned by krb5_default_local_realm(3) is used.
84
85
87 The kdb5_ldap_util utility comprises a set of commands, each with its
88 own set of options. These commands are described in the following sub‐
89 sections.
90
91 The create Command
92 The create command creates a realm in a directory. The command has the
93 following syntax:
94
95 create \
96 [-subtrees subtree_dn_list]
97 [-sscope search_scope]
98 [-containerref container_reference_dn]
99 [-k mkeytype]
100 [-m|-P password| -sf stashfilename]
101 [-s]
102 [-r realm]
103 [-maxtktlife max_ticket_life]
104 [-kdcdn kdc_service_list]
105 [-admindn admin_service_list]
106 [-maxrenewlife max_renewable_ticket_life]
107 [ticket_flags]
108
109
110
111
112 The create command has the following options:
113
114 -subtree subtree_dn_list
115
116 See "Common Command-specific Options," above.
117
118
119 -sscope search_scope
120
121 See "Common Command-specific Options," above.
122
123
124 -containerref container_reference_dn
125
126 See "Common Command-specific Options," above.
127
128
129 -k mkeytype
130
131 Specifies the key type of the master key in the database; the
132 default is that given in kdc.conf(4).
133
134
135 -m
136
137 Specifies that the master database password should be read from the
138 TTY rather than fetched from a file on the disk.
139
140
141 -P password
142
143 Specifies the master database password. This option is not recom‐
144 mended.
145
146
147 -sf stashfilename
148
149 Specifies the stash file of the master database password.
150
151
152 -s
153
154 Specifies that the stash file is to be created.
155
156
157 -maxtktlife max_ticket_life
158
159 See "Common Command-specific Options," above.
160
161
162 -maxrenewlife max_renewable_ticket_life
163
164 See "Common Command-specific Options," above.
165
166
167 -r realm
168
169 See "Common Command-specific Options," above.
170
171
172 ticket_flags
173
174 Specifies the ticket flags. If this option is not specified, by
175 default, none of the flags are set. This means all the ticket
176 options will be allowed and no restriction will be set. See "Ticket
177 Flags" for a list and descriptions of these flags.
178
179
180 The modify Command
181 The modify command modifies the attributes of a realm. The command has
182 the following syntax:
183
184 modify \
185 [-subtrees subtree_dn_list]
186 [-sscope search_scope]
187 [-containerref container_reference_dn]
188 [-r realm]
189 [-maxtktlife max_ticket_life]
190 [-maxrenewlife max_renewable_ticket_life]
191 [ticket_flags]
192
193
194
195
196 The modify command has the following options:
197
198 -subtree subtree_dn_list
199
200 See "Common Command-specific Options," above.
201
202
203 -sscope search_scope
204
205 See "Common Command-specific Options," above.
206
207
208 -containerref container_reference_dn
209
210 See "Common Command-specific Options," above.
211
212
213 -maxtktlife max_ticket_life
214
215 See "Common Command-specific Options," above.
216
217
218 -maxrenewlife max_renewable_ticket_life
219
220 See "Common Command-specific Options," above.
221
222
223 -r realm
224
225 See "Common Command-specific Options," above.
226
227
228 ticket_flags
229
230 Specifies the ticket flags. If this option is not specified, by
231 default, none of the flags are set. This means all the ticket
232 options will be allowed and no restriction will be set. See "Ticket
233 Flags" for a list and descriptions of these flags.
234
235
236 The view Command
237 The view command displays the attributes of a realm. The command has
238 the following syntax:
239
240 view [-r realm]
241
242
243
244
245 The view command has the following option:
246
247 -r realm
248
249 See "Common Command-specific Options," above.
250
251
252 The destroy Command
253 The destroy command destroys a realm, including the master key stash
254 file. The command has the following syntax:
255
256 destroy [-f] [-r realm]
257
258
259
260
261 The destroy command has the following options:
262
263 -f
264
265 If specified, destroy does not prompt you for confirmation.
266
267
268 -r realm
269
270 See "Common Command-specific Options," above.
271
272
273 The list Command
274 The list command displays the names of realms. The command has the fol‐
275 lowing syntax:
276
277 list
278
279
280
281
282 The list command has no options.
283
284 The stashsrvpw Command
285 The stashsrvpw command enables you to store the password for service
286 object in a file so that a KDC and Administration server can use it to
287 authenticate to the LDAP server. The command has the following syntax:
288
289 stashsrvpw [-f filename] servicedn
290
291
292
293
294 The stashsrvpw command has the following option and argument:
295
296 -f filename
297
298 Specifies the complete path of the service password file. The
299 default is:
300
301 /var/krb5/service_passwd
302
303
304
305
306 servicedn
307
308 Specifies the distinguished name (DN) of the service object whose
309 password is to be stored in file.
310
311
312 The create_policy Command
313 The create_policy command creates a ticket policy in a directory. The
314 command has the following syntax:
315
316 create_policy \
317 [-r realm]
318 [-maxtktlife max_ticket_life]
319 [-maxrenewlife max_renewable_ticket_life]
320 [ticket_flags]
321 policy_name
322
323
324
325
326 The create_policy command has the following options:
327
328 -r realm
329
330 See "Common Command-specific Options," above.
331
332
333 -maxtktlife max_ticket_life
334
335 See "Common Command-specific Options," above.
336
337
338 -maxrenewlife max_renewable_ticket_life
339
340 See "Common Command-specific Options," above.
341
342
343 ticket_flags
344
345 Specifies the ticket flags. If this option is not specified, by
346 default, none of the flags are set. This means all the ticket
347 options will be allowed and no restriction will be set. See "Ticket
348 Flags" for a list and descriptions of these flags.
349
350
351 policy_name
352
353 Specifies the name of the ticket policy.
354
355
356 The modify_policy Command
357 The modify_policy command modifies the attributes of a ticket policy.
358 The command has the following syntax:
359
360 modify_policy \
361 [-r realm]
362 [-maxtktlife max_ticket_life]
363 [-maxrenewlife max_renewable_ticket_life]
364 [ticket_flags]
365 policy_name
366
367
368
369
370 The modify_policy command has the same options and argument as those
371 for the create_policy command.
372
373 The view_policy Command
374 The view_policy command displays the attributes of a ticket policy. The
375 command has the following syntax:
376
377 view_policy [-r realm] policy_name
378
379
380
381
382 The view_policy command has the following options:
383
384 -r realm
385
386 See "Common Command-specific Options," above.
387
388
389 policy_name
390
391 Specifies the name of the ticket policy.
392
393
394 The destroy_policy Command
395 The destroy_policy command destroys an existing ticket policy. The com‐
396 mand has the following syntax:
397
398 destroy_policy [-r realm] [-force] policy_name
399
400
401
402
403 The destroy_policy command has the following options:
404
405 -r realm
406
407 See "Common Command-specific Options," above.
408
409
410 -force
411
412 Forces the deletion of the policy object. If not specified, you
413 will be prompted for confirmation before the policy is deleted.
414 Enter yes to confirm the deletion.
415
416
417 policy_name
418
419 Specifies the name of the ticket policy.
420
421
422 The list_policy Command
423 The list_policy command lists the ticket policies in the default or a
424 specified realm. The command has the following syntax:
425
426 list_policy [-r realm]
427
428
429
430
431 The list_policy command has the following option:
432
433 -r realm
434
435 See "Common Command-specific Options," above.
436
437
439 A number of kdb5_ldap_util commands have ticket_flag options. These
440 flags are described as follows:
441
442 {-|+}allow_dup_skey
443
444 -allow_dup_skey disables user-to-user authentication for principals
445 by prohibiting principals from obtaining a session key for another
446 user. This setting sets the KRB5_KDB_DISALLOW_DUP_SKEY flag.
447 +allow_dup_skey clears this flag.
448
449
450 {-|+}allow_forwardable
451
452 -allow_forwardable prohibits principals from obtaining forwardable
453 tickets. This setting sets the KRB5_KDB_DISALLOW_FORWARDABLE flag.
454 +allow_forwardable clears this flag.
455
456
457 {-|+}allow_postdated
458
459 -allow_postdated prohibits principals from obtaining postdated
460 tickets. This setting sets the KRB5_KDB_DISALLOW_POSTDATED flag.
461 +allow_postdated clears this flag.
462
463
464 {-|+}allow_proxiable
465
466 -allow_proxiable prohibits principals from obtaining proxiable
467 tickets. This setting sets the KRB5_KDB_DISALLOW_PROXIABLE flag.
468 +allow_proxiable clears this flag.
469
470
471 {-|+}allow_renewable
472
473 -allow_renewable prohibits principals from obtaining renewable
474 tickets. This setting sets the KRB5_KDB_DISALLOW_RENEWABLE flag.
475 +allow_renewable clears this flag.
476
477
478 {-|+}allow_svr
479
480 -allow_svr prohibits the issuance of service tickets for princi‐
481 pals. This setting sets the KRB5_KDB_DISALLOW_SVR flag. +allow_svr
482 clears this flag.
483
484
485 {-|+}allow_tgs_req
486
487 -allow_tgs_req specifies that a Ticket-Granting Service (TGS)
488 request for a service ticket for principals is not permitted. This
489 option is useless for most purposes. +allow_tgs_req clears this
490 flag. The default is +allow_tgs_req. In effect, -allow_tgs_req
491 sets the KRB5_KDB_DISALLOW_TGT_BASED flag on principals in the
492 database.
493
494
495 {-|+}allow_tix
496
497 -allow_tix forbids the issuance of any tickets for principals.
498 +allow_tix clears this flag. The default is +allow_tix. In effect,
499 -allow_tix sets the KRB5_KDB_DISALLOW_ALL_TIX flag on principals in
500 the database.
501
502
503 {-|+}needchange
504
505 +needchange sets a flag in the attributes field to force a password
506 change; -needchange clears that flag. The default is -needchange.
507 In effect, +needchange sets the KRB5_KDB_REQUIRES_PWCHANGE flag on
508 principals in the database.
509
510
511 {-|+}password_changing_service
512
513 +password_changing_service sets a flag in the attributes field
514 marking a principal as a password-change-service principal (a des‐
515 ignation that is most often not useful). -password_changing_service
516 clears the flag. That this flag has a long name is intentional. The
517 default is -password_changing_service. In effect, +password_chang‐
518 ing_service sets the KRB5_KDB_PWCHANGE_SERVICE flag on principals
519 in the database.
520
521
522 {-|+}requires_hwauth
523
524 +requires_hwauth requires principals to preauthenticate using a
525 hardware device before being allowed to kinit(1). This setting
526 sets the KRB5_KDB_REQUIRES_HW_AUTH flag. -requires_hwauth clears
527 this flag.
528
529
530 {-|+}requires_preauth
531
532 +requires_preauth requires principals to preauthenticate before
533 being allowed to kinit(1). This setting sets the
534 KRB5_KDB_REQUIRES_PRE_AUTH flag. -requires_preauth clears this
535 flag.
536
537
539 Example 1 Using create
540
541
542 The following is an example of the use of the create command.
543
544
545 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
546 create -subtrees o=org -sscope SUB -r ATHENA.MIT.EDU
547 Password for "cn=admin,o=org": password entered
548 Initializing database for realm 'ATHENA.MIT.EDU'
549 You will be prompted for the database Master Password.
550 It is important that you NOT FORGET this password.
551 Enter KDC database master key: master key entered
552 Re-enter KDC database master key to verify: master key re-enteredjjjjjj
553
554
555
556 Example 2 Using modify
557
558
559 The following is an example of the use of the modify command.
560
561
562 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
563 modify +requires_preauth -r ATHENA.MIT.EDU
564 Password for "cn=admin,o=org": password entered
565 Password for "cn=admin,o=org": password entered
566
567
568
569 Example 3 Using view
570
571
572 The following is an example of the use of the view command.
573
574
575 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
576 view -r ATHENA.MIT.EDU
577 Password for "cn=admin,o=org":
578 Realm Name: ATHENA.MIT.EDU
579 Subtree: ou=users,o=org
580 Subtree: ou=servers,o=org
581 SearchScope: ONE
582 Maximum ticket life: 0 days 01:00:00
583 Maximum renewable life: 0 days 10:00:00
584 Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
585
586
587
588 Example 4 Using destroy
589
590
591 The following is an example of the use of the destroy command.
592
593
594 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
595 destroy -r ATHENA.MIT.EDU
596 Password for "cn=admin,o=org": password entered
597 Deleting KDC database of 'ATHENA.MIT.EDU', are you sure?
598 (type 'yes' to confirm)? yes
599 OK, deleting database of 'ATHENA.MIT.EDU'...
600
601
602
603 Example 5 Using list
604
605
606 The following is an example of the use of the list command.
607
608
609 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu list
610 Password for "cn=admin,o=org": password entered
611 Re-enter Password for "cn=admin,o=org": password re-entered
612 ATHENA.MIT.EDU
613 OPENLDAP.MIT.EDU
614 MEDIA-LAB.MIT.EDU
615
616
617
618 Example 6 Using stashsrvpw
619
620
621 The following is an example of the use of the stashsrvpw command.
622
623
624 # kdb5_ldap_util stashsrvpw -f \
625 /home/andrew/conf_keyfile cn=service-kdc,o=org
626 Password for "cn=service-kdc,o=org": password entered
627 Re-enter password for "cn=service-kdc,o=org": password re-entered
628
629
630
631 Example 7 Using create_policy
632
633
634 The following is an example of the use of the create_policy command.
635
636
637 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
638 create_policy -r ATHENA.MIT.EDU \
639 -maxtktlife "1 day" -maxrenewlife "1 week" \
640 -allow_postdated +needchange -allow_forwardable tktpolicy
641 Password for "cn=admin,o=org": password entered
642
643
644
645 Example 8 Using modify_policy
646
647
648 The following is an example of the use of the modify_policy command.
649
650
651 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
652 modify_policy -r ATHENA.MIT.EDU \
653 -maxtktlife "60 minutes" -maxrenewlife "10 hours" \
654 +allow_postdated -requires_preauth tktpolicy
655 Password for "cn=admin,o=org": password entered
656
657
658
659 Example 9 Using view_policy
660
661
662 The following is an example of the use of the view_policy command.
663
664
665 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
666 view_policy -r ATHENA.MIT.EDU tktpolicy
667 Password for "cn=admin,o=org": password entered
668 Ticket policy: tktpolicy
669 Maximum ticket life: 0 days 01:00:00
670 Maximum renewable life: 0 days 10:00:00
671 Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
672
673
674
675 Example 10 Using destroy_policy
676
677
678 The following is an example of the use of the destroy_policy command.
679
680
681 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
682 destroy_policy -r ATHENA.MIT.EDU tktpolicy
683 Password for "cn=admin,o=org": password entered
684 This will delete the policy object 'tktpolicy', are you sure?
685 (type 'yes' to confirm)? yes
686 ** policy object 'tktpolicy' deleted.
687
688
689
690 Example 11 Using list_policy
691
692
693 The following is an example of the use of the list_policy command.
694
695
696 # kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu \
697 list_policy -r ATHENA.MIT.EDU
698 Password for "cn=admin,o=org": password entered
699 tktpolicy
700 tmppolicy
701 userpolicy
702
703
704
705 Example 12 Using setsrvpw
706
707
708 The following is an example of the use of the setsrvpw command.
709
710
711 # kdb5_ldap_util setsrvpw -D cn=admin,o=org setsrvpw \
712 -fileonly -f /home/andrew/conf_keyfile cn=service-kdc,o=org
713 Password for "cn=admin,o=org": password entered
714 Password for "cn=service-kdc,o=org": password entered
715 Re-enter password for "cn=service-kdc,o=org": password re-entered
716
717
718
719 Example 13 Using create_service
720
721
722 The following is an example of the use of the create_service command.
723
724
725 # kdb5_ldap_util -D cn=admin,o=org create_service \
726 -kdc -randpw -f /home/andrew/conf_keyfile cn=service-kdc,o=org
727 Password for "cn=admin,o=org": password entered
728 File does not exist. Creating the file /home/andrew/conf_keyfile...
729
730
731
732 Example 14 Using modify_service
733
734
735 The following is an example of the use of the modify_service command.
736
737
738 # kdb5_ldap_util -D cn=admin,o=org modify_service \
739 -realm ATHENA.MIT.EDU cn=service-kdc,o=org
740 Password for "cn=admin,o=org": password entered
741 Changing rights for the service object. Please wait ... done
742
743
744
745 Example 15 Using view_service
746
747
748 The following is an example of the use of the view_service command.
749
750
751 # kdb5_ldap_util -D cn=admin,o=org view_service \
752 cn=service-kdc,o=org
753 Password for "cn=admin,o=org": password entered
754 Service dn: cn=service-kdc,o=org
755 Service type: kdc
756 Service host list:
757 Realm DN list: cn=ATHENA.MIT.EDU,cn=Kerberos,cn=Security
758
759
760
761 Example 16 Using destroy_service
762
763
764 The following is an example of the use of the destroy_service command.
765
766
767 # kdb5_ldap_util -D cn=admin,o=org destroy_service \
768 cn=service-kdc,o=org
769 Password for "cn=admin,o=org": password entered
770 This will delete the service object 'cn=service-kdc,o=org', are you sure?
771 (type 'yes' to confirm)? yes
772 ** service object 'cn=service-kdc,o=org' deleted.
773
774
775
776 Example 17 Using list_service
777
778
779 The following is an example of the use of the list_service command.
780
781
782 # kdb5_ldap_util -D cn=admin,o=org list_service
783 Password for "cn=admin,o=org": password entered
784 cn=service-kdc,o=org
785 cn=service-adm,o=org
786 cn=service-pwd,o=org
787
788
789
791 See attributes(5) for descriptions of the following attributes:
792
793
794
795
796 ┌─────────────────────────────┬─────────────────────────────┐
797 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
798 ├─────────────────────────────┼─────────────────────────────┤
799 │Availability │SUNWkrbu │
800 ├─────────────────────────────┼─────────────────────────────┤
801 │Interface Stability │Volatile │
802 └─────────────────────────────┴─────────────────────────────┘
803
805 kinit(1), kadmin(1M), kdc.conf(4), attributes(5)
806
807
808
809SunOS 5.11 28 Aug 2007 kdb5_ldap_util(1M)