1.\" $NetBSD: kadmin.1,v 1.2 2017/01/28 21:31:44 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 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. 264.Ed 265.Pp 266.Nm privileges 267.Bd -ragged -offset indent 268Lists the operations you are allowed to perform. These include 269.Li add , 270.Li add_enctype , 271.Li change-password , 272.Li delete , 273.Li del_enctype , 274.Li get , 275.Li get-keys , 276.Li list , 277and 278.Li modify . 279.Ed 280.Pp 281.Nm rename 282.Ar from to 283.Bd -ragged -offset indent 284Renames a principal. This is normally transparent, but since keys are 285salted with the principal name, they will have a non-standard salt, 286and clients which are unable to cope with this will fail. Kerberos 4 287suffers from this. 288.Ed 289.Pp 290.Nm check 291.Op Ar realm 292.Pp 293.Bd -ragged -offset indent 294Check database for strange configurations on important principals. If 295no realm is given, the default realm is used. 296.Ed 297.Pp 298When running in local mode, the following commands can also be used: 299.Pp 300.Nm dump 301.Op Fl d | Fl Fl decrypt 302.Op Fl f Ns Ar format | Fl Fl format= Ns Ar format 303.Op Ar dump-file 304.Bd -ragged -offset indent 305Writes the database in 306.Dq machine readable text 307form to the specified file, or standard out. If the database is 308encrypted, the dump will also have encrypted keys, unless 309.Fl Fl decrypt 310is used. If 311.Fl Fl format=MIT 312is used then the dump will be in MIT format. Otherwise it will be in 313Heimdal format. 314.Ed 315.Pp 316.Nm init 317.Op Fl Fl realm-max-ticket-life= Ns Ar string 318.Op Fl Fl realm-max-renewable-life= Ns Ar string 319.Ar realm 320.Bd -ragged -offset indent 321Initializes the Kerberos database with entries for a new realm. It's 322possible to have more than one realm served by one server. 323.Ed 324.Pp 325.Nm load 326.Ar file 327.Bd -ragged -offset indent 328Reads a previously dumped database, and re-creates that database from 329scratch. 330.Ed 331.Pp 332.Nm merge 333.Ar file 334.Bd -ragged -offset indent 335Similar to 336.Nm load 337but just modifies the database with the entries in the dump file. 338.Ed 339.Pp 340.Nm stash 341.Oo Fl e Ar enctype \*(Ba Xo 342.Fl Fl enctype= Ns Ar enctype 343.Xc 344.Oc 345.Oo Fl k Ar keyfile \*(Ba Xo 346.Fl Fl key-file= Ns Ar keyfile 347.Xc 348.Oc 349.Op Fl Fl convert-file 350.Op Fl Fl master-key-fd= Ns Ar fd 351.Bd -ragged -offset indent 352Writes the Kerberos master key to a file used by the KDC. 353.Ed 354.\".Sh ENVIRONMENT 355.\".Sh FILES 356.\".Sh EXAMPLES 357.\".Sh DIAGNOSTICS 358.Sh SEE ALSO 359.Xr kadmind 8 , 360.Xr kdc 8 361.\".Sh STANDARDS 362.\".Sh HISTORY 363.\".Sh AUTHORS 364.\".Sh BUGS 365