1.\" $NetBSD: kadmin.1,v 1.3 2019/12/15 22:50:46 christos Exp $ 2.\" 3.\" Copyright (c) 2000 - 2007 Kungliga Tekniska Högskolan 4.\" (Royal Institute of Technology, Stockholm, Sweden). 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" 3. Neither the name of the Institute nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" Id 35.\" 36.Dd Feb 22, 2007 37.Dt KADMIN 1 38.Os 39.Sh NAME 40.Nm kadmin 41.Nd Kerberos administration utility 42.Sh SYNOPSIS 43.Nm 44.Bk -words 45.Op Fl p Ar string \*(Ba Fl Fl principal= Ns Ar string 46.Op Fl K Ar string \*(Ba Fl Fl keytab= Ns Ar string 47.Op Fl c Ar file \*(Ba Fl Fl config-file= Ns Ar file 48.Op Fl k Ar file \*(Ba Fl Fl key-file= Ns Ar file 49.Op Fl r Ar realm \*(Ba Fl Fl realm= Ns Ar realm 50.Op Fl a Ar host \*(Ba Fl Fl admin-server= Ns Ar host 51.Op Fl s Ar port number \*(Ba Fl Fl server-port= Ns Ar port number 52.Op Fl l | Fl Fl local 53.Op Fl h | Fl Fl help 54.Op Fl v | Fl Fl version 55.Op Ar command 56.Ek 57.Sh DESCRIPTION 58The 59.Nm 60program is used to make modifications to the Kerberos database, either remotely via the 61.Xr kadmind 8 62daemon, or locally (with the 63.Fl l 64option). 65.Pp 66Supported options: 67.Bl -tag -width Ds 68.It Fl p Ar string , Fl Fl principal= Ns Ar string 69principal to authenticate as 70.It Fl K Ar string , Fl Fl keytab= Ns Ar string 71keytab for authentication principal 72.It Fl c Ar file , Fl Fl config-file= Ns Ar file 73location of config file 74.It Fl k Ar file , Fl Fl key-file= Ns Ar file 75location of master key file 76.It Fl r Ar realm , Fl Fl realm= Ns Ar realm 77realm to use 78.It Fl a Ar host , Fl Fl admin-server= Ns Ar host 79server to contact 80.It Fl s Ar port number , Fl Fl server-port= Ns Ar port number 81port to use 82.It Fl l , Fl Fl local 83local admin mode 84.El 85.Pp 86If no 87.Ar command 88is given on the command line, 89.Nm 90will prompt for commands to process. Some of the commands that take 91one or more principals as argument 92.Ns ( Nm delete , 93.Nm ext_keytab , 94.Nm get , 95.Nm modify , 96and 97.Nm passwd ) 98will accept a glob style wildcard, and perform the operation on all 99matching principals. 100.Pp 101Commands include: 102.\" not using a list here, since groff apparently gets confused 103.\" with nested Xo/Xc 104.Pp 105.Nm add 106.Op Fl r | Fl Fl random-key 107.Op Fl Fl random-password 108.Op Fl p Ar string \*(Ba Fl Fl password= Ns Ar string 109.Op Fl Fl key= Ns Ar string 110.Op Fl Fl max-ticket-life= Ns Ar lifetime 111.Op Fl Fl max-renewable-life= Ns Ar lifetime 112.Op Fl Fl attributes= Ns Ar attributes 113.Op Fl Fl expiration-time= Ns Ar time 114.Op Fl Fl pw-expiration-time= Ns Ar time 115.Op Fl Fl policy= Ns Ar policy-name 116.Ar principal... 117.Bd -ragged -offset indent 118Adds a new principal to the database. The options not passed on the 119command line will be promped for. 120The only policy supported by Heimdal servers is 121.Ql default . 122.Ed 123.Pp 124.Nm add_enctype 125.Op Fl r | Fl Fl random-key 126.Ar principal enctypes... 127.Pp 128.Bd -ragged -offset indent 129Adds a new encryption type to the principal, only random key are 130supported. 131.Ed 132.Pp 133.Nm delete 134.Ar principal... 135.Bd -ragged -offset indent 136Removes a principal. 137.Ed 138.Pp 139.Nm del_enctype 140.Ar principal enctypes... 141.Bd -ragged -offset indent 142Removes some enctypes from a principal; this can be useful if the 143service belonging to the principal is known to not handle certain 144enctypes. 145.Ed 146.Pp 147.Nm ext_keytab 148.Oo Fl k Ar string \*(Ba Xo 149.Fl Fl keytab= Ns Ar string 150.Xc 151.Oc 152.Ar principal... 153.Bd -ragged -offset indent 154Creates a keytab with the keys of the specified principals. Requires 155get-keys rights, otherwise the principal's keys are changed and saved in 156the keytab. 157.Ed 158.Pp 159.Nm get 160.Op Fl l | Fl Fl long 161.Op Fl s | Fl Fl short 162.Op Fl t | Fl Fl terse 163.Op Fl o Ar string | Fl Fl column-info= Ns Ar string 164.Ar principal... 165.Bd -ragged -offset indent 166Lists the matching principals, short prints the result as a table, 167while long format produces a more verbose output. Which columns to 168print can be selected with the 169.Fl o 170option. The argument is a comma separated list of column names 171optionally appended with an equal sign 172.Pq Sq = 173and a column header. Which columns are printed by default differ 174slightly between short and long output. 175.Pp 176The default terse output format is similar to 177.Fl s o Ar principal= , 178just printing the names of matched principals. 179.Pp 180Possible column names include: 181.Li principal , 182.Li princ_expire_time , 183.Li pw_expiration , 184.Li last_pwd_change , 185.Li max_life , 186.Li max_rlife , 187.Li mod_time , 188.Li mod_name , 189.Li attributes , 190.Li kvno , 191.Li mkvno , 192.Li last_success , 193.Li last_failed , 194.Li fail_auth_count , 195.Li policy , 196and 197.Li keytypes . 198.Ed 199.Pp 200.Nm modify 201.Oo Fl a Ar attributes \*(Ba Xo 202.Fl Fl attributes= Ns Ar attributes 203.Xc 204.Oc 205.Op Fl Fl max-ticket-life= Ns Ar lifetime 206.Op Fl Fl max-renewable-life= Ns Ar lifetime 207.Op Fl Fl expiration-time= Ns Ar time 208.Op Fl Fl pw-expiration-time= Ns Ar time 209.Op Fl Fl kvno= Ns Ar number 210.Op Fl Fl policy= Ns Ar policy-name 211.Ar principal... 212.Bd -ragged -offset indent 213Modifies certain attributes of a principal. If run without command 214line options, you will be prompted. With command line options, it will 215only change the ones specified. 216.Pp 217Only policy supported by Heimdal is 218.Ql default . 219.Pp 220Possible attributes are: 221.Li new-princ , 222.Li support-desmd5 , 223.Li pwchange-service , 224.Li disallow-svr , 225.Li requires-pw-change , 226.Li requires-hw-auth , 227.Li requires-pre-auth , 228.Li disallow-all-tix , 229.Li disallow-dup-skey , 230.Li disallow-proxiable , 231.Li disallow-renewable , 232.Li disallow-tgt-based , 233.Li disallow-forwardable , 234.Li disallow-postdated 235.Pp 236Attributes may be negated with a "-", e.g., 237.Pp 238kadmin -l modify -a -disallow-proxiable user 239.Ed 240.Pp 241.Nm passwd 242.Op Fl Fl keepold 243.Op Fl r | Fl Fl random-key 244.Op Fl Fl random-password 245.Oo Fl p Ar string \*(Ba Xo 246.Fl Fl password= Ns Ar string 247.Xc 248.Oc 249.Op Fl Fl key= Ns Ar string 250.Ar principal... 251.Bd -ragged -offset indent 252Changes the password of an existing principal. 253.Ed 254.Pp 255.Nm verify-password-quality 256.Ar principal 257.Ar password 258.Bd -ragged -offset indent 259Run the password quality check function locally. 260You can run this on the host that is configured to run the kadmind 261process to verify that your configuration file is correct. 262The verification is done locally, if kadmin is run in remote mode, 263no rpc call is done to the server. NOTE: if the environment has 264verify-password-quality configured to use a back-end that stores 265password history (such as heimdal-history), running 266verify-quality-password will cause an update to the password 267database meaning that merely verifying the quality of the password 268using verify-quality-password invalidates the use of that 269principal/password in the future. 270.Ed 271.Pp 272.Nm privileges 273.Bd -ragged -offset indent 274Lists the operations you are allowed to perform. These include 275.Li add , 276.Li add_enctype , 277.Li change-password , 278.Li delete , 279.Li del_enctype , 280.Li get , 281.Li get-keys , 282.Li list , 283and 284.Li modify . 285.Ed 286.Pp 287.Nm rename 288.Ar from to 289.Bd -ragged -offset indent 290Renames a principal. This is normally transparent, but since keys are 291salted with the principal name, they will have a non-standard salt, 292and clients which are unable to cope with this will fail. Kerberos 4 293suffers from this. 294.Ed 295.Pp 296.Nm check 297.Op Ar realm 298.Pp 299.Bd -ragged -offset indent 300Check database for strange configurations on important principals. If 301no realm is given, the default realm is used. 302.Ed 303.Pp 304When running in local mode, the following commands can also be used: 305.Pp 306.Nm dump 307.Op Fl d | Fl Fl decrypt 308.Op Fl f Ns Ar format | Fl Fl format= Ns Ar format 309.Op Ar dump-file 310.Bd -ragged -offset indent 311Writes the database in 312.Dq machine readable text 313form to the specified file, or standard out. If the database is 314encrypted, the dump will also have encrypted keys, unless 315.Fl Fl decrypt 316is used. If 317.Fl Fl format=MIT 318is used then the dump will be in MIT format. Otherwise it will be in 319Heimdal format. 320.Ed 321.Pp 322.Nm init 323.Op Fl Fl realm-max-ticket-life= Ns Ar string 324.Op Fl Fl realm-max-renewable-life= Ns Ar string 325.Ar realm 326.Bd -ragged -offset indent 327Initializes the Kerberos database with entries for a new realm. It's 328possible to have more than one realm served by one server. 329.Ed 330.Pp 331.Nm load 332.Ar file 333.Bd -ragged -offset indent 334Reads a previously dumped database, and re-creates that database from 335scratch. 336.Ed 337.Pp 338.Nm merge 339.Ar file 340.Bd -ragged -offset indent 341Similar to 342.Nm load 343but just modifies the database with the entries in the dump file. 344.Ed 345.Pp 346.Nm stash 347.Oo Fl e Ar enctype \*(Ba Xo 348.Fl Fl enctype= Ns Ar enctype 349.Xc 350.Oc 351.Oo Fl k Ar keyfile \*(Ba Xo 352.Fl Fl key-file= Ns Ar keyfile 353.Xc 354.Oc 355.Op Fl Fl convert-file 356.Op Fl Fl master-key-fd= Ns Ar fd 357.Bd -ragged -offset indent 358Writes the Kerberos master key to a file used by the KDC. 359.Ed 360.\".Sh ENVIRONMENT 361.\".Sh FILES 362.\".Sh EXAMPLES 363.\".Sh DIAGNOSTICS 364.Sh SEE ALSO 365.Xr kadmind 8 , 366.Xr kdc 8 367.\".Sh STANDARDS 368.\".Sh HISTORY 369.\".Sh AUTHORS 370.\".Sh BUGS 371