kadmin.1 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "KADMIN" "1" " " "1.20.1" "MIT Kerberos"
  4. .SH NAME
  5. kadmin \- Kerberos V5 database administration program
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .sp
  35. \fBkadmin\fP
  36. [\fB\-O\fP|\fB\-N\fP]
  37. [\fB\-r\fP \fIrealm\fP]
  38. [\fB\-p\fP \fIprincipal\fP]
  39. [\fB\-q\fP \fIquery\fP]
  40. [[\fB\-c\fP \fIcache_name\fP]|[\fB\-k\fP [\fB\-t\fP \fIkeytab\fP]]|\fB\-n\fP]
  41. [\fB\-w\fP \fIpassword\fP]
  42. [\fB\-s\fP \fIadmin_server\fP[:\fIport\fP]]
  43. [command args...]
  44. .sp
  45. \fBkadmin.local\fP
  46. [\fB\-r\fP \fIrealm\fP]
  47. [\fB\-p\fP \fIprincipal\fP]
  48. [\fB\-q\fP \fIquery\fP]
  49. [\fB\-d\fP \fIdbname\fP]
  50. [\fB\-e\fP \fIenc\fP:\fIsalt\fP ...]
  51. [\fB\-m\fP]
  52. [\fB\-x\fP \fIdb_args\fP]
  53. [command args...]
  54. .SH DESCRIPTION
  55. .sp
  56. kadmin and kadmin.local are command\-line interfaces to the Kerberos V5
  57. administration system. They provide nearly identical functionalities;
  58. the difference is that kadmin.local directly accesses the KDC
  59. database, while kadmin performs operations using kadmind(8)\&.
  60. Except as explicitly noted otherwise, this man page will use "kadmin"
  61. to refer to both versions. kadmin provides for the maintenance of
  62. Kerberos principals, password policies, and service key tables
  63. (keytabs).
  64. .sp
  65. The remote kadmin client uses Kerberos to authenticate to kadmind
  66. using the service principal \fBkadmin/admin\fP or \fBkadmin/ADMINHOST\fP
  67. (where \fIADMINHOST\fP is the fully\-qualified hostname of the admin
  68. server). If the credentials cache contains a ticket for one of these
  69. principals, and the \fB\-c\fP credentials_cache option is specified, that
  70. ticket is used to authenticate to kadmind. Otherwise, the \fB\-p\fP and
  71. \fB\-k\fP options are used to specify the client Kerberos principal name
  72. used to authenticate. Once kadmin has determined the principal name,
  73. it requests a service ticket from the KDC, and uses that service
  74. ticket to authenticate to kadmind.
  75. .sp
  76. Since kadmin.local directly accesses the KDC database, it usually must
  77. be run directly on the primary KDC with sufficient permissions to read
  78. the KDC database. If the KDC database uses the LDAP database module,
  79. kadmin.local can be run on any host which can access the LDAP server.
  80. .SH OPTIONS
  81. .INDENT 0.0
  82. .TP
  83. \fB\-r\fP \fIrealm\fP
  84. Use \fIrealm\fP as the default database realm.
  85. .TP
  86. \fB\-p\fP \fIprincipal\fP
  87. Use \fIprincipal\fP to authenticate. Otherwise, kadmin will append
  88. \fB/admin\fP to the primary principal name of the default ccache,
  89. the value of the \fBUSER\fP environment variable, or the username as
  90. obtained with getpwuid, in order of preference.
  91. .TP
  92. \fB\-k\fP
  93. Use a keytab to decrypt the KDC response instead of prompting for
  94. a password. In this case, the default principal will be
  95. \fBhost/hostname\fP\&. If there is no keytab specified with the
  96. \fB\-t\fP option, then the default keytab will be used.
  97. .TP
  98. \fB\-t\fP \fIkeytab\fP
  99. Use \fIkeytab\fP to decrypt the KDC response. This can only be used
  100. with the \fB\-k\fP option.
  101. .TP
  102. \fB\-n\fP
  103. Requests anonymous processing. Two types of anonymous principals
  104. are supported. For fully anonymous Kerberos, configure PKINIT on
  105. the KDC and configure \fBpkinit_anchors\fP in the client\(aqs
  106. krb5.conf(5)\&. Then use the \fB\-n\fP option with a principal
  107. of the form \fB@REALM\fP (an empty principal name followed by the
  108. at\-sign and a realm name). If permitted by the KDC, an anonymous
  109. ticket will be returned. A second form of anonymous tickets is
  110. supported; these realm\-exposed tickets hide the identity of the
  111. client but not the client\(aqs realm. For this mode, use \fBkinit
  112. \-n\fP with a normal principal name. If supported by the KDC, the
  113. principal (but not realm) will be replaced by the anonymous
  114. principal. As of release 1.8, the MIT Kerberos KDC only supports
  115. fully anonymous operation.
  116. .TP
  117. \fB\-c\fP \fIcredentials_cache\fP
  118. Use \fIcredentials_cache\fP as the credentials cache. The cache
  119. should contain a service ticket for the \fBkadmin/admin\fP or
  120. \fBkadmin/ADMINHOST\fP (where \fIADMINHOST\fP is the fully\-qualified
  121. hostname of the admin server) service; it can be acquired with the
  122. kinit(1) program. If this option is not specified, kadmin
  123. requests a new service ticket from the KDC, and stores it in its
  124. own temporary ccache.
  125. .TP
  126. \fB\-w\fP \fIpassword\fP
  127. Use \fIpassword\fP instead of prompting for one. Use this option with
  128. care, as it may expose the password to other users on the system
  129. via the process list.
  130. .TP
  131. \fB\-q\fP \fIquery\fP
  132. Perform the specified query and then exit.
  133. .TP
  134. \fB\-d\fP \fIdbname\fP
  135. Specifies the name of the KDC database. This option does not
  136. apply to the LDAP database module.
  137. .TP
  138. \fB\-s\fP \fIadmin_server\fP[:\fIport\fP]
  139. Specifies the admin server which kadmin should contact.
  140. .TP
  141. \fB\-m\fP
  142. If using kadmin.local, prompt for the database master password
  143. instead of reading it from a stash file.
  144. .TP
  145. \fB\-e\fP "\fIenc\fP:\fIsalt\fP ..."
  146. Sets the keysalt list to be used for any new keys created. See
  147. Keysalt_lists in kdc.conf(5) for a list of possible
  148. values.
  149. .TP
  150. \fB\-O\fP
  151. Force use of old AUTH_GSSAPI authentication flavor.
  152. .TP
  153. \fB\-N\fP
  154. Prevent fallback to AUTH_GSSAPI authentication flavor.
  155. .TP
  156. \fB\-x\fP \fIdb_args\fP
  157. Specifies the database specific arguments. See the next section
  158. for supported options.
  159. .UNINDENT
  160. .sp
  161. Starting with release 1.14, if any command\-line arguments remain after
  162. the options, they will be treated as a single query to be executed.
  163. This mode of operation is intended for scripts and behaves differently
  164. from the interactive mode in several respects:
  165. .INDENT 0.0
  166. .IP \(bu 2
  167. Query arguments are split by the shell, not by kadmin.
  168. .IP \(bu 2
  169. Informational and warning messages are suppressed. Error messages
  170. and query output (e.g. for \fBget_principal\fP) will still be
  171. displayed.
  172. .IP \(bu 2
  173. Confirmation prompts are disabled (as if \fB\-force\fP was given).
  174. Password prompts will still be issued as required.
  175. .IP \(bu 2
  176. The exit status will be non\-zero if the query fails.
  177. .UNINDENT
  178. .sp
  179. The \fB\-q\fP option does not carry these behavior differences; the query
  180. will be processed as if it was entered interactively. The \fB\-q\fP
  181. option cannot be used in combination with a query in the remaining
  182. arguments.
  183. .SH DATABASE OPTIONS
  184. .sp
  185. Database options can be used to override database\-specific defaults.
  186. Supported options for the DB2 module are:
  187. .INDENT 0.0
  188. .INDENT 3.5
  189. .INDENT 0.0
  190. .TP
  191. \fB\-x dbname=\fP*filename*
  192. Specifies the base filename of the DB2 database.
  193. .TP
  194. \fB\-x lockiter\fP
  195. Make iteration operations hold the lock for the duration of
  196. the entire operation, rather than temporarily releasing the
  197. lock while handling each principal. This is the default
  198. behavior, but this option exists to allow command line
  199. override of a [dbmodules] setting. First introduced in
  200. release 1.13.
  201. .TP
  202. \fB\-x unlockiter\fP
  203. Make iteration operations unlock the database for each
  204. principal, instead of holding the lock for the duration of the
  205. entire operation. First introduced in release 1.13.
  206. .UNINDENT
  207. .UNINDENT
  208. .UNINDENT
  209. .sp
  210. Supported options for the LDAP module are:
  211. .INDENT 0.0
  212. .INDENT 3.5
  213. .INDENT 0.0
  214. .TP
  215. \fB\-x host=\fP\fIldapuri\fP
  216. Specifies the LDAP server to connect to by a LDAP URI.
  217. .TP
  218. \fB\-x binddn=\fP\fIbind_dn\fP
  219. Specifies the DN used to bind to the LDAP server.
  220. .TP
  221. \fB\-x bindpwd=\fP\fIpassword\fP
  222. Specifies the password or SASL secret used to bind to the LDAP
  223. server. Using this option may expose the password to other
  224. users on the system via the process list; to avoid this,
  225. instead stash the password using the \fBstashsrvpw\fP command of
  226. kdb5_ldap_util(8)\&.
  227. .TP
  228. \fB\-x sasl_mech=\fP\fImechanism\fP
  229. Specifies the SASL mechanism used to bind to the LDAP server.
  230. The bind DN is ignored if a SASL mechanism is used. New in
  231. release 1.13.
  232. .TP
  233. \fB\-x sasl_authcid=\fP\fIname\fP
  234. Specifies the authentication name used when binding to the
  235. LDAP server with a SASL mechanism, if the mechanism requires
  236. one. New in release 1.13.
  237. .TP
  238. \fB\-x sasl_authzid=\fP\fIname\fP
  239. Specifies the authorization name used when binding to the LDAP
  240. server with a SASL mechanism. New in release 1.13.
  241. .TP
  242. \fB\-x sasl_realm=\fP\fIrealm\fP
  243. Specifies the realm used when binding to the LDAP server with
  244. a SASL mechanism, if the mechanism uses one. New in release
  245. 1.13.
  246. .TP
  247. \fB\-x debug=\fP\fIlevel\fP
  248. sets the OpenLDAP client library debug level. \fIlevel\fP is an
  249. integer to be interpreted by the library. Debugging messages
  250. are printed to standard error. New in release 1.12.
  251. .UNINDENT
  252. .UNINDENT
  253. .UNINDENT
  254. .SH COMMANDS
  255. .sp
  256. When using the remote client, available commands may be restricted
  257. according to the privileges specified in the kadm5.acl(5) file
  258. on the admin server.
  259. .SS add_principal
  260. .INDENT 0.0
  261. .INDENT 3.5
  262. \fBadd_principal\fP [\fIoptions\fP] \fInewprinc\fP
  263. .UNINDENT
  264. .UNINDENT
  265. .sp
  266. Creates the principal \fInewprinc\fP, prompting twice for a password. If
  267. no password policy is specified with the \fB\-policy\fP option, and the
  268. policy named \fBdefault\fP is assigned to the principal if it exists.
  269. However, creating a policy named \fBdefault\fP will not automatically
  270. assign this policy to previously existing principals. This policy
  271. assignment can be suppressed with the \fB\-clearpolicy\fP option.
  272. .sp
  273. This command requires the \fBadd\fP privilege.
  274. .sp
  275. Aliases: \fBaddprinc\fP, \fBank\fP
  276. .sp
  277. Options:
  278. .INDENT 0.0
  279. .TP
  280. \fB\-expire\fP \fIexpdate\fP
  281. (getdate string) The expiration date of the principal.
  282. .TP
  283. \fB\-pwexpire\fP \fIpwexpdate\fP
  284. (getdate string) The password expiration date.
  285. .TP
  286. \fB\-maxlife\fP \fImaxlife\fP
  287. (duration or getdate string) The maximum ticket life
  288. for the principal.
  289. .TP
  290. \fB\-maxrenewlife\fP \fImaxrenewlife\fP
  291. (duration or getdate string) The maximum renewable
  292. life of tickets for the principal.
  293. .TP
  294. \fB\-kvno\fP \fIkvno\fP
  295. The initial key version number.
  296. .TP
  297. \fB\-policy\fP \fIpolicy\fP
  298. The password policy used by this principal. If not specified, the
  299. policy \fBdefault\fP is used if it exists (unless \fB\-clearpolicy\fP
  300. is specified).
  301. .TP
  302. \fB\-clearpolicy\fP
  303. Prevents any policy from being assigned when \fB\-policy\fP is not
  304. specified.
  305. .TP
  306. {\-|+}\fBallow_postdated\fP
  307. \fB\-allow_postdated\fP prohibits this principal from obtaining
  308. postdated tickets. \fB+allow_postdated\fP clears this flag.
  309. .TP
  310. {\-|+}\fBallow_forwardable\fP
  311. \fB\-allow_forwardable\fP prohibits this principal from obtaining
  312. forwardable tickets. \fB+allow_forwardable\fP clears this flag.
  313. .TP
  314. {\-|+}\fBallow_renewable\fP
  315. \fB\-allow_renewable\fP prohibits this principal from obtaining
  316. renewable tickets. \fB+allow_renewable\fP clears this flag.
  317. .TP
  318. {\-|+}\fBallow_proxiable\fP
  319. \fB\-allow_proxiable\fP prohibits this principal from obtaining
  320. proxiable tickets. \fB+allow_proxiable\fP clears this flag.
  321. .TP
  322. {\-|+}\fBallow_dup_skey\fP
  323. \fB\-allow_dup_skey\fP disables user\-to\-user authentication for this
  324. principal by prohibiting others from obtaining a service ticket
  325. encrypted in this principal\(aqs TGT session key.
  326. \fB+allow_dup_skey\fP clears this flag.
  327. .TP
  328. {\-|+}\fBrequires_preauth\fP
  329. \fB+requires_preauth\fP requires this principal to preauthenticate
  330. before being allowed to kinit. \fB\-requires_preauth\fP clears this
  331. flag. When \fB+requires_preauth\fP is set on a service principal,
  332. the KDC will only issue service tickets for that service principal
  333. if the client\(aqs initial authentication was performed using
  334. preauthentication.
  335. .TP
  336. {\-|+}\fBrequires_hwauth\fP
  337. \fB+requires_hwauth\fP requires this principal to preauthenticate
  338. using a hardware device before being allowed to kinit.
  339. \fB\-requires_hwauth\fP clears this flag. When \fB+requires_hwauth\fP is
  340. set on a service principal, the KDC will only issue service tickets
  341. for that service principal if the client\(aqs initial authentication was
  342. performed using a hardware device to preauthenticate.
  343. .TP
  344. {\-|+}\fBok_as_delegate\fP
  345. \fB+ok_as_delegate\fP sets the \fBokay as delegate\fP flag on tickets
  346. issued with this principal as the service. Clients may use this
  347. flag as a hint that credentials should be delegated when
  348. authenticating to the service. \fB\-ok_as_delegate\fP clears this
  349. flag.
  350. .TP
  351. {\-|+}\fBallow_svr\fP
  352. \fB\-allow_svr\fP prohibits the issuance of service tickets for this
  353. principal. In release 1.17 and later, user\-to\-user service
  354. tickets are still allowed unless the \fB\-allow_dup_skey\fP flag is
  355. also set. \fB+allow_svr\fP clears this flag.
  356. .TP
  357. {\-|+}\fBallow_tgs_req\fP
  358. \fB\-allow_tgs_req\fP specifies that a Ticket\-Granting Service (TGS)
  359. request for a service ticket for this principal is not permitted.
  360. \fB+allow_tgs_req\fP clears this flag.
  361. .TP
  362. {\-|+}\fBallow_tix\fP
  363. \fB\-allow_tix\fP forbids the issuance of any tickets for this
  364. principal. \fB+allow_tix\fP clears this flag.
  365. .TP
  366. {\-|+}\fBneedchange\fP
  367. \fB+needchange\fP forces a password change on the next initial
  368. authentication to this principal. \fB\-needchange\fP clears this
  369. flag.
  370. .TP
  371. {\-|+}\fBpassword_changing_service\fP
  372. \fB+password_changing_service\fP marks this principal as a password
  373. change service principal.
  374. .TP
  375. {\-|+}\fBok_to_auth_as_delegate\fP
  376. \fB+ok_to_auth_as_delegate\fP allows this principal to acquire
  377. forwardable tickets to itself from arbitrary users, for use with
  378. constrained delegation.
  379. .TP
  380. {\-|+}\fBno_auth_data_required\fP
  381. \fB+no_auth_data_required\fP prevents PAC or AD\-SIGNEDPATH data from
  382. being added to service tickets for the principal.
  383. .TP
  384. {\-|+}\fBlockdown_keys\fP
  385. \fB+lockdown_keys\fP prevents keys for this principal from leaving
  386. the KDC via kadmind. The chpass and extract operations are denied
  387. for a principal with this attribute. The chrand operation is
  388. allowed, but will not return the new keys. The delete and rename
  389. operations are also denied if this attribute is set, in order to
  390. prevent a malicious administrator from replacing principals like
  391. krbtgt/* or kadmin/* with new principals without the attribute.
  392. This attribute can be set via the network protocol, but can only
  393. be removed using kadmin.local.
  394. .TP
  395. \fB\-randkey\fP
  396. Sets the key of the principal to a random value.
  397. .TP
  398. \fB\-nokey\fP
  399. Causes the principal to be created with no key. New in release
  400. 1.12.
  401. .TP
  402. \fB\-pw\fP \fIpassword\fP
  403. Sets the password of the principal to the specified string and
  404. does not prompt for a password. Note: using this option in a
  405. shell script may expose the password to other users on the system
  406. via the process list.
  407. .TP
  408. \fB\-e\fP \fIenc\fP:\fIsalt\fP,...
  409. Uses the specified keysalt list for setting the keys of the
  410. principal. See Keysalt_lists in kdc.conf(5) for a
  411. list of possible values.
  412. .TP
  413. \fB\-x\fP \fIdb_princ_args\fP
  414. Indicates database\-specific options. The options for the LDAP
  415. database module are:
  416. .INDENT 7.0
  417. .TP
  418. \fB\-x dn=\fP\fIdn\fP
  419. Specifies the LDAP object that will contain the Kerberos
  420. principal being created.
  421. .TP
  422. \fB\-x linkdn=\fP\fIdn\fP
  423. Specifies the LDAP object to which the newly created Kerberos
  424. principal object will point.
  425. .TP
  426. \fB\-x containerdn=\fP\fIcontainer_dn\fP
  427. Specifies the container object under which the Kerberos
  428. principal is to be created.
  429. .TP
  430. \fB\-x tktpolicy=\fP\fIpolicy\fP
  431. Associates a ticket policy to the Kerberos principal.
  432. .UNINDENT
  433. .sp
  434. \fBNOTE:\fP
  435. .INDENT 7.0
  436. .INDENT 3.5
  437. .INDENT 0.0
  438. .IP \(bu 2
  439. The \fBcontainerdn\fP and \fBlinkdn\fP options cannot be
  440. specified with the \fBdn\fP option.
  441. .IP \(bu 2
  442. If the \fIdn\fP or \fIcontainerdn\fP options are not specified while
  443. adding the principal, the principals are created under the
  444. principal container configured in the realm or the realm
  445. container.
  446. .IP \(bu 2
  447. \fIdn\fP and \fIcontainerdn\fP should be within the subtrees or
  448. principal container configured in the realm.
  449. .UNINDENT
  450. .UNINDENT
  451. .UNINDENT
  452. .UNINDENT
  453. .sp
  454. Example:
  455. .INDENT 0.0
  456. .INDENT 3.5
  457. .sp
  458. .nf
  459. .ft C
  460. kadmin: addprinc jennifer
  461. No policy specified for "jennifer@ATHENA.MIT.EDU";
  462. defaulting to no policy.
  463. Enter password for principal jennifer@ATHENA.MIT.EDU:
  464. Re\-enter password for principal jennifer@ATHENA.MIT.EDU:
  465. Principal "jennifer@ATHENA.MIT.EDU" created.
  466. kadmin:
  467. .ft P
  468. .fi
  469. .UNINDENT
  470. .UNINDENT
  471. .SS modify_principal
  472. .INDENT 0.0
  473. .INDENT 3.5
  474. \fBmodify_principal\fP [\fIoptions\fP] \fIprincipal\fP
  475. .UNINDENT
  476. .UNINDENT
  477. .sp
  478. Modifies the specified principal, changing the fields as specified.
  479. The options to \fBadd_principal\fP also apply to this command, except
  480. for the \fB\-randkey\fP, \fB\-pw\fP, and \fB\-e\fP options. In addition, the
  481. option \fB\-clearpolicy\fP will clear the current policy of a principal.
  482. .sp
  483. This command requires the \fImodify\fP privilege.
  484. .sp
  485. Alias: \fBmodprinc\fP
  486. .sp
  487. Options (in addition to the \fBaddprinc\fP options):
  488. .INDENT 0.0
  489. .TP
  490. \fB\-unlock\fP
  491. Unlocks a locked principal (one which has received too many failed
  492. authentication attempts without enough time between them according
  493. to its password policy) so that it can successfully authenticate.
  494. .UNINDENT
  495. .SS rename_principal
  496. .INDENT 0.0
  497. .INDENT 3.5
  498. \fBrename_principal\fP [\fB\-force\fP] \fIold_principal\fP \fInew_principal\fP
  499. .UNINDENT
  500. .UNINDENT
  501. .sp
  502. Renames the specified \fIold_principal\fP to \fInew_principal\fP\&. This
  503. command prompts for confirmation, unless the \fB\-force\fP option is
  504. given.
  505. .sp
  506. This command requires the \fBadd\fP and \fBdelete\fP privileges.
  507. .sp
  508. Alias: \fBrenprinc\fP
  509. .SS delete_principal
  510. .INDENT 0.0
  511. .INDENT 3.5
  512. \fBdelete_principal\fP [\fB\-force\fP] \fIprincipal\fP
  513. .UNINDENT
  514. .UNINDENT
  515. .sp
  516. Deletes the specified \fIprincipal\fP from the database. This command
  517. prompts for deletion, unless the \fB\-force\fP option is given.
  518. .sp
  519. This command requires the \fBdelete\fP privilege.
  520. .sp
  521. Alias: \fBdelprinc\fP
  522. .SS change_password
  523. .INDENT 0.0
  524. .INDENT 3.5
  525. \fBchange_password\fP [\fIoptions\fP] \fIprincipal\fP
  526. .UNINDENT
  527. .UNINDENT
  528. .sp
  529. Changes the password of \fIprincipal\fP\&. Prompts for a new password if
  530. neither \fB\-randkey\fP or \fB\-pw\fP is specified.
  531. .sp
  532. This command requires the \fBchangepw\fP privilege, or that the
  533. principal running the program is the same as the principal being
  534. changed.
  535. .sp
  536. Alias: \fBcpw\fP
  537. .sp
  538. The following options are available:
  539. .INDENT 0.0
  540. .TP
  541. \fB\-randkey\fP
  542. Sets the key of the principal to a random value.
  543. .TP
  544. \fB\-pw\fP \fIpassword\fP
  545. Set the password to the specified string. Using this option in a
  546. script may expose the password to other users on the system via
  547. the process list.
  548. .TP
  549. \fB\-e\fP \fIenc\fP:\fIsalt\fP,...
  550. Uses the specified keysalt list for setting the keys of the
  551. principal. See Keysalt_lists in kdc.conf(5) for a
  552. list of possible values.
  553. .TP
  554. \fB\-keepold\fP
  555. Keeps the existing keys in the database. This flag is usually not
  556. necessary except perhaps for \fBkrbtgt\fP principals.
  557. .UNINDENT
  558. .sp
  559. Example:
  560. .INDENT 0.0
  561. .INDENT 3.5
  562. .sp
  563. .nf
  564. .ft C
  565. kadmin: cpw systest
  566. Enter password for principal systest@BLEEP.COM:
  567. Re\-enter password for principal systest@BLEEP.COM:
  568. Password for systest@BLEEP.COM changed.
  569. kadmin:
  570. .ft P
  571. .fi
  572. .UNINDENT
  573. .UNINDENT
  574. .SS purgekeys
  575. .INDENT 0.0
  576. .INDENT 3.5
  577. \fBpurgekeys\fP [\fB\-all\fP|\fB\-keepkvno\fP \fIoldest_kvno_to_keep\fP] \fIprincipal\fP
  578. .UNINDENT
  579. .UNINDENT
  580. .sp
  581. Purges previously retained old keys (e.g., from \fBchange_password
  582. \-keepold\fP) from \fIprincipal\fP\&. If \fB\-keepkvno\fP is specified, then
  583. only purges keys with kvnos lower than \fIoldest_kvno_to_keep\fP\&. If
  584. \fB\-all\fP is specified, then all keys are purged. The \fB\-all\fP option
  585. is new in release 1.12.
  586. .sp
  587. This command requires the \fBmodify\fP privilege.
  588. .SS get_principal
  589. .INDENT 0.0
  590. .INDENT 3.5
  591. \fBget_principal\fP [\fB\-terse\fP] \fIprincipal\fP
  592. .UNINDENT
  593. .UNINDENT
  594. .sp
  595. Gets the attributes of principal. With the \fB\-terse\fP option, outputs
  596. fields as quoted tab\-separated strings.
  597. .sp
  598. This command requires the \fBinquire\fP privilege, or that the principal
  599. running the the program to be the same as the one being listed.
  600. .sp
  601. Alias: \fBgetprinc\fP
  602. .sp
  603. Examples:
  604. .INDENT 0.0
  605. .INDENT 3.5
  606. .sp
  607. .nf
  608. .ft C
  609. kadmin: getprinc tlyu/admin
  610. Principal: tlyu/admin@BLEEP.COM
  611. Expiration date: [never]
  612. Last password change: Mon Aug 12 14:16:47 EDT 1996
  613. Password expiration date: [never]
  614. Maximum ticket life: 0 days 10:00:00
  615. Maximum renewable life: 7 days 00:00:00
  616. Last modified: Mon Aug 12 14:16:47 EDT 1996 (bjaspan/admin@BLEEP.COM)
  617. Last successful authentication: [never]
  618. Last failed authentication: [never]
  619. Failed password attempts: 0
  620. Number of keys: 1
  621. Key: vno 1, aes256\-cts\-hmac\-sha384\-192
  622. MKey: vno 1
  623. Attributes:
  624. Policy: [none]
  625. kadmin: getprinc \-terse systest
  626. systest@BLEEP.COM 3 86400 604800 1
  627. 785926535 753241234 785900000
  628. tlyu/admin@BLEEP.COM 786100034 0 0
  629. kadmin:
  630. .ft P
  631. .fi
  632. .UNINDENT
  633. .UNINDENT
  634. .SS list_principals
  635. .INDENT 0.0
  636. .INDENT 3.5
  637. \fBlist_principals\fP [\fIexpression\fP]
  638. .UNINDENT
  639. .UNINDENT
  640. .sp
  641. Retrieves all or some principal names. \fIexpression\fP is a shell\-style
  642. glob expression that can contain the wild\-card characters \fB?\fP,
  643. \fB*\fP, and \fB[]\fP\&. All principal names matching the expression are
  644. printed. If no expression is provided, all principal names are
  645. printed. If the expression does not contain an \fB@\fP character, an
  646. \fB@\fP character followed by the local realm is appended to the
  647. expression.
  648. .sp
  649. This command requires the \fBlist\fP privilege.
  650. .sp
  651. Alias: \fBlistprincs\fP, \fBget_principals\fP, \fBgetprincs\fP
  652. .sp
  653. Example:
  654. .INDENT 0.0
  655. .INDENT 3.5
  656. .sp
  657. .nf
  658. .ft C
  659. kadmin: listprincs test*
  660. test3@SECURE\-TEST.OV.COM
  661. test2@SECURE\-TEST.OV.COM
  662. test1@SECURE\-TEST.OV.COM
  663. testuser@SECURE\-TEST.OV.COM
  664. kadmin:
  665. .ft P
  666. .fi
  667. .UNINDENT
  668. .UNINDENT
  669. .SS get_strings
  670. .INDENT 0.0
  671. .INDENT 3.5
  672. \fBget_strings\fP \fIprincipal\fP
  673. .UNINDENT
  674. .UNINDENT
  675. .sp
  676. Displays string attributes on \fIprincipal\fP\&.
  677. .sp
  678. This command requires the \fBinquire\fP privilege.
  679. .sp
  680. Alias: \fBgetstrs\fP
  681. .SS set_string
  682. .INDENT 0.0
  683. .INDENT 3.5
  684. \fBset_string\fP \fIprincipal\fP \fIname\fP \fIvalue\fP
  685. .UNINDENT
  686. .UNINDENT
  687. .sp
  688. Sets a string attribute on \fIprincipal\fP\&. String attributes are used to
  689. supply per\-principal configuration to the KDC and some KDC plugin
  690. modules. The following string attribute names are recognized by the
  691. KDC:
  692. .INDENT 0.0
  693. .TP
  694. \fBrequire_auth\fP
  695. Specifies an authentication indicator which is required to
  696. authenticate to the principal as a service. Multiple indicators
  697. can be specified, separated by spaces; in this case any of the
  698. specified indicators will be accepted. (New in release 1.14.)
  699. .TP
  700. \fBsession_enctypes\fP
  701. Specifies the encryption types supported for session keys when the
  702. principal is authenticated to as a server. See
  703. Encryption_types in kdc.conf(5) for a list of the
  704. accepted values.
  705. .TP
  706. \fBotp\fP
  707. Enables One Time Passwords (OTP) preauthentication for a client
  708. \fIprincipal\fP\&. The \fIvalue\fP is a JSON string representing an array
  709. of objects, each having optional \fBtype\fP and \fBusername\fP fields.
  710. .TP
  711. \fBpkinit_cert_match\fP
  712. Specifies a matching expression that defines the certificate
  713. attributes required for the client certificate used by the
  714. principal during PKINIT authentication. The matching expression
  715. is in the same format as those used by the \fBpkinit_cert_match\fP
  716. option in krb5.conf(5)\&. (New in release 1.16.)
  717. .UNINDENT
  718. .sp
  719. This command requires the \fBmodify\fP privilege.
  720. .sp
  721. Alias: \fBsetstr\fP
  722. .sp
  723. Example:
  724. .INDENT 0.0
  725. .INDENT 3.5
  726. .sp
  727. .nf
  728. .ft C
  729. set_string host/foo.mit.edu session_enctypes aes128\-cts
  730. set_string user@FOO.COM otp "[{""type"":""hotp"",""username"":""al""}]"
  731. .ft P
  732. .fi
  733. .UNINDENT
  734. .UNINDENT
  735. .SS del_string
  736. .INDENT 0.0
  737. .INDENT 3.5
  738. \fBdel_string\fP \fIprincipal\fP \fIkey\fP
  739. .UNINDENT
  740. .UNINDENT
  741. .sp
  742. Deletes a string attribute from \fIprincipal\fP\&.
  743. .sp
  744. This command requires the \fBdelete\fP privilege.
  745. .sp
  746. Alias: \fBdelstr\fP
  747. .SS add_policy
  748. .INDENT 0.0
  749. .INDENT 3.5
  750. \fBadd_policy\fP [\fIoptions\fP] \fIpolicy\fP
  751. .UNINDENT
  752. .UNINDENT
  753. .sp
  754. Adds a password policy named \fIpolicy\fP to the database.
  755. .sp
  756. This command requires the \fBadd\fP privilege.
  757. .sp
  758. Alias: \fBaddpol\fP
  759. .sp
  760. The following options are available:
  761. .INDENT 0.0
  762. .TP
  763. \fB\-maxlife\fP \fItime\fP
  764. (duration or getdate string) Sets the maximum
  765. lifetime of a password.
  766. .TP
  767. \fB\-minlife\fP \fItime\fP
  768. (duration or getdate string) Sets the minimum
  769. lifetime of a password.
  770. .TP
  771. \fB\-minlength\fP \fIlength\fP
  772. Sets the minimum length of a password.
  773. .TP
  774. \fB\-minclasses\fP \fInumber\fP
  775. Sets the minimum number of character classes required in a
  776. password. The five character classes are lower case, upper case,
  777. numbers, punctuation, and whitespace/unprintable characters.
  778. .TP
  779. \fB\-history\fP \fInumber\fP
  780. Sets the number of past keys kept for a principal. This option is
  781. not supported with the LDAP KDC database module.
  782. .UNINDENT
  783. .INDENT 0.0
  784. .TP
  785. \fB\-maxfailure\fP \fImaxnumber\fP
  786. Sets the number of authentication failures before the principal is
  787. locked. Authentication failures are only tracked for principals
  788. which require preauthentication. The counter of failed attempts
  789. resets to 0 after a successful attempt to authenticate. A
  790. \fImaxnumber\fP value of 0 (the default) disables lockout.
  791. .UNINDENT
  792. .INDENT 0.0
  793. .TP
  794. \fB\-failurecountinterval\fP \fIfailuretime\fP
  795. (duration or getdate string) Sets the allowable time
  796. between authentication failures. If an authentication failure
  797. happens after \fIfailuretime\fP has elapsed since the previous
  798. failure, the number of authentication failures is reset to 1. A
  799. \fIfailuretime\fP value of 0 (the default) means forever.
  800. .UNINDENT
  801. .INDENT 0.0
  802. .TP
  803. \fB\-lockoutduration\fP \fIlockouttime\fP
  804. (duration or getdate string) Sets the duration for
  805. which the principal is locked from authenticating if too many
  806. authentication failures occur without the specified failure count
  807. interval elapsing. A duration of 0 (the default) means the
  808. principal remains locked out until it is administratively unlocked
  809. with \fBmodprinc \-unlock\fP\&.
  810. .TP
  811. \fB\-allowedkeysalts\fP
  812. Specifies the key/salt tuples supported for long\-term keys when
  813. setting or changing a principal\(aqs password/keys. See
  814. Keysalt_lists in kdc.conf(5) for a list of the
  815. accepted values, but note that key/salt tuples must be separated
  816. with commas (\(aq,\(aq) only. To clear the allowed key/salt policy use
  817. a value of \(aq\-\(aq.
  818. .UNINDENT
  819. .sp
  820. Example:
  821. .INDENT 0.0
  822. .INDENT 3.5
  823. .sp
  824. .nf
  825. .ft C
  826. kadmin: add_policy \-maxlife "2 days" \-minlength 5 guests
  827. kadmin:
  828. .ft P
  829. .fi
  830. .UNINDENT
  831. .UNINDENT
  832. .SS modify_policy
  833. .INDENT 0.0
  834. .INDENT 3.5
  835. \fBmodify_policy\fP [\fIoptions\fP] \fIpolicy\fP
  836. .UNINDENT
  837. .UNINDENT
  838. .sp
  839. Modifies the password policy named \fIpolicy\fP\&. Options are as described
  840. for \fBadd_policy\fP\&.
  841. .sp
  842. This command requires the \fBmodify\fP privilege.
  843. .sp
  844. Alias: \fBmodpol\fP
  845. .SS delete_policy
  846. .INDENT 0.0
  847. .INDENT 3.5
  848. \fBdelete_policy\fP [\fB\-force\fP] \fIpolicy\fP
  849. .UNINDENT
  850. .UNINDENT
  851. .sp
  852. Deletes the password policy named \fIpolicy\fP\&. Prompts for confirmation
  853. before deletion. The command will fail if the policy is in use by any
  854. principals.
  855. .sp
  856. This command requires the \fBdelete\fP privilege.
  857. .sp
  858. Alias: \fBdelpol\fP
  859. .sp
  860. Example:
  861. .INDENT 0.0
  862. .INDENT 3.5
  863. .sp
  864. .nf
  865. .ft C
  866. kadmin: del_policy guests
  867. Are you sure you want to delete the policy "guests"?
  868. (yes/no): yes
  869. kadmin:
  870. .ft P
  871. .fi
  872. .UNINDENT
  873. .UNINDENT
  874. .SS get_policy
  875. .INDENT 0.0
  876. .INDENT 3.5
  877. \fBget_policy\fP [ \fB\-terse\fP ] \fIpolicy\fP
  878. .UNINDENT
  879. .UNINDENT
  880. .sp
  881. Displays the values of the password policy named \fIpolicy\fP\&. With the
  882. \fB\-terse\fP flag, outputs the fields as quoted strings separated by
  883. tabs.
  884. .sp
  885. This command requires the \fBinquire\fP privilege.
  886. .sp
  887. Alias: \fBgetpol\fP
  888. .sp
  889. Examples:
  890. .INDENT 0.0
  891. .INDENT 3.5
  892. .sp
  893. .nf
  894. .ft C
  895. kadmin: get_policy admin
  896. Policy: admin
  897. Maximum password life: 180 days 00:00:00
  898. Minimum password life: 00:00:00
  899. Minimum password length: 6
  900. Minimum number of password character classes: 2
  901. Number of old keys kept: 5
  902. Reference count: 17
  903. kadmin: get_policy \-terse admin
  904. admin 15552000 0 6 2 5 17
  905. kadmin:
  906. .ft P
  907. .fi
  908. .UNINDENT
  909. .UNINDENT
  910. .sp
  911. The "Reference count" is the number of principals using that policy.
  912. With the LDAP KDC database module, the reference count field is not
  913. meaningful.
  914. .SS list_policies
  915. .INDENT 0.0
  916. .INDENT 3.5
  917. \fBlist_policies\fP [\fIexpression\fP]
  918. .UNINDENT
  919. .UNINDENT
  920. .sp
  921. Retrieves all or some policy names. \fIexpression\fP is a shell\-style
  922. glob expression that can contain the wild\-card characters \fB?\fP,
  923. \fB*\fP, and \fB[]\fP\&. All policy names matching the expression are
  924. printed. If no expression is provided, all existing policy names are
  925. printed.
  926. .sp
  927. This command requires the \fBlist\fP privilege.
  928. .sp
  929. Aliases: \fBlistpols\fP, \fBget_policies\fP, \fBgetpols\fP\&.
  930. .sp
  931. Examples:
  932. .INDENT 0.0
  933. .INDENT 3.5
  934. .sp
  935. .nf
  936. .ft C
  937. kadmin: listpols
  938. test\-pol
  939. dict\-only
  940. once\-a\-min
  941. test\-pol\-nopw
  942. kadmin: listpols t*
  943. test\-pol
  944. test\-pol\-nopw
  945. kadmin:
  946. .ft P
  947. .fi
  948. .UNINDENT
  949. .UNINDENT
  950. .SS ktadd
  951. .INDENT 0.0
  952. .INDENT 3.5
  953. .nf
  954. \fBktadd\fP [options] \fIprincipal\fP
  955. \fBktadd\fP [options] \fB\-glob\fP \fIprinc\-exp\fP
  956. .fi
  957. .sp
  958. .UNINDENT
  959. .UNINDENT
  960. .sp
  961. Adds a \fIprincipal\fP, or all principals matching \fIprinc\-exp\fP, to a
  962. keytab file. Each principal\(aqs keys are randomized in the process.
  963. The rules for \fIprinc\-exp\fP are described in the \fBlist_principals\fP
  964. command.
  965. .sp
  966. This command requires the \fBinquire\fP and \fBchangepw\fP privileges.
  967. With the \fB\-glob\fP form, it also requires the \fBlist\fP privilege.
  968. .sp
  969. The options are:
  970. .INDENT 0.0
  971. .TP
  972. \fB\-k[eytab]\fP \fIkeytab\fP
  973. Use \fIkeytab\fP as the keytab file. Otherwise, the default keytab is
  974. used.
  975. .TP
  976. \fB\-e\fP \fIenc\fP:\fIsalt\fP,...
  977. Uses the specified keysalt list for setting the new keys of the
  978. principal. See Keysalt_lists in kdc.conf(5) for a
  979. list of possible values.
  980. .TP
  981. \fB\-q\fP
  982. Display less verbose information.
  983. .TP
  984. \fB\-norandkey\fP
  985. Do not randomize the keys. The keys and their version numbers stay
  986. unchanged. This option cannot be specified in combination with the
  987. \fB\-e\fP option.
  988. .UNINDENT
  989. .sp
  990. An entry for each of the principal\(aqs unique encryption types is added,
  991. ignoring multiple keys with the same encryption type but different
  992. salt types.
  993. .sp
  994. Alias: \fBxst\fP
  995. .sp
  996. Example:
  997. .INDENT 0.0
  998. .INDENT 3.5
  999. .sp
  1000. .nf
  1001. .ft C
  1002. kadmin: ktadd \-k /tmp/foo\-new\-keytab host/foo.mit.edu
  1003. Entry for principal host/foo.mit.edu@ATHENA.MIT.EDU with kvno 3,
  1004. encryption type aes256\-cts\-hmac\-sha1\-96 added to keytab
  1005. FILE:/tmp/foo\-new\-keytab
  1006. kadmin:
  1007. .ft P
  1008. .fi
  1009. .UNINDENT
  1010. .UNINDENT
  1011. .SS ktremove
  1012. .INDENT 0.0
  1013. .INDENT 3.5
  1014. \fBktremove\fP [options] \fIprincipal\fP [\fIkvno\fP | \fIall\fP | \fIold\fP]
  1015. .UNINDENT
  1016. .UNINDENT
  1017. .sp
  1018. Removes entries for the specified \fIprincipal\fP from a keytab. Requires
  1019. no permissions, since this does not require database access.
  1020. .sp
  1021. If the string "all" is specified, all entries for that principal are
  1022. removed; if the string "old" is specified, all entries for that
  1023. principal except those with the highest kvno are removed. Otherwise,
  1024. the value specified is parsed as an integer, and all entries whose
  1025. kvno match that integer are removed.
  1026. .sp
  1027. The options are:
  1028. .INDENT 0.0
  1029. .TP
  1030. \fB\-k[eytab]\fP \fIkeytab\fP
  1031. Use \fIkeytab\fP as the keytab file. Otherwise, the default keytab is
  1032. used.
  1033. .TP
  1034. \fB\-q\fP
  1035. Display less verbose information.
  1036. .UNINDENT
  1037. .sp
  1038. Alias: \fBktrem\fP
  1039. .sp
  1040. Example:
  1041. .INDENT 0.0
  1042. .INDENT 3.5
  1043. .sp
  1044. .nf
  1045. .ft C
  1046. kadmin: ktremove kadmin/admin all
  1047. Entry for principal kadmin/admin with kvno 3 removed from keytab
  1048. FILE:/etc/krb5.keytab
  1049. kadmin:
  1050. .ft P
  1051. .fi
  1052. .UNINDENT
  1053. .UNINDENT
  1054. .SS lock
  1055. .sp
  1056. Lock database exclusively. Use with extreme caution! This command
  1057. only works with the DB2 KDC database module.
  1058. .SS unlock
  1059. .sp
  1060. Release the exclusive database lock.
  1061. .SS list_requests
  1062. .sp
  1063. Lists available for kadmin requests.
  1064. .sp
  1065. Aliases: \fBlr\fP, \fB?\fP
  1066. .SS quit
  1067. .sp
  1068. Exit program. If the database was locked, the lock is released.
  1069. .sp
  1070. Aliases: \fBexit\fP, \fBq\fP
  1071. .SH HISTORY
  1072. .sp
  1073. The kadmin program was originally written by Tom Yu at MIT, as an
  1074. interface to the OpenVision Kerberos administration program.
  1075. .SH ENVIRONMENT
  1076. .sp
  1077. See kerberos(7) for a description of Kerberos environment
  1078. variables.
  1079. .SH SEE ALSO
  1080. .sp
  1081. kpasswd(1), kadmind(8), kerberos(7)
  1082. .SH AUTHOR
  1083. MIT
  1084. .SH COPYRIGHT
  1085. 1985-2022, MIT
  1086. .\" Generated by docutils manpage writer.
  1087. .