1.\"	$NetBSD: kadmin.8,v 1.2 2011/04/14 19:19:19 elric 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 8
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 -principal= Ns Ar string
46.Op Fl K Ar string \*(Ba Fl -keytab= Ns Ar string
47.Op Fl c Ar file \*(Ba Fl -config-file= Ns Ar file
48.Op Fl k Ar file \*(Ba Fl -key-file= Ns Ar file
49.Op Fl r Ar realm \*(Ba Fl -realm= Ns Ar realm
50.Op Fl a Ar host \*(Ba Fl -admin-server= Ns Ar host
51.Op Fl s Ar port number \*(Ba Fl -server-port= Ns Ar port number
52.Op Fl l | Fl -local
53.Op Fl h | Fl -help
54.Op Fl v | 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 -principal= Ns Ar string
69principal to authenticate as
70.It Fl K Ar string , Fl -keytab= Ns Ar string
71keytab for authentication principal
72.It Fl c Ar file , Fl -config-file= Ns Ar file
73location of config file
74.It Fl k Ar file , Fl -key-file= Ns Ar file
75location of master key file
76.It Fl r Ar realm , Fl -realm= Ns Ar realm
77realm to use
78.It Fl a Ar host , Fl -admin-server= Ns Ar host
79server to contact
80.It Fl s Ar port number , Fl -server-port= Ns Ar port number
81port to use
82.It Fl l , 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 -random-key
107.Op Fl -random-password
108.Op Fl p Ar string \*(Ba Fl -password= Ns Ar string
109.Op Fl -key= Ns Ar string
110.Op Fl -max-ticket-life= Ns Ar lifetime
111.Op Fl -max-renewable-life= Ns Ar lifetime
112.Op Fl -attributes= Ns Ar attributes
113.Op Fl -expiration-time= Ns Ar time
114.Op Fl -pw-expiration-time= Ns Ar time
115.Ar principal...
116.Bd -ragged -offset indent
117Adds a new principal to the database. The options not passed on the
118command line will be promped for.
119.Ed
120.Pp
121.Nm add_enctype
122.Op Fl r | Fl -random-key
123.Ar principal enctypes...
124.Pp
125.Bd -ragged -offset indent
126Adds a new encryption type to the principal, only random key are
127supported.
128.Ed
129.Pp
130.Nm delete
131.Ar principal...
132.Bd -ragged -offset indent
133Removes a principal.
134.Ed
135.Pp
136.Nm del_enctype
137.Ar principal enctypes...
138.Bd -ragged -offset indent
139Removes some enctypes from a principal; this can be useful if the
140service belonging to the principal is known to not handle certain
141enctypes.
142.Ed
143.Pp
144.Nm ext_keytab
145.Oo Fl k Ar string \*(Ba Xo
146.Fl -keytab= Ns Ar string
147.Xc
148.Oc
149.Ar principal...
150.Bd -ragged -offset indent
151Creates a keytab with the keys of the specified principals.
152.Ed
153.Pp
154.Nm get
155.Op Fl l | Fl -long
156.Op Fl s | Fl -short
157.Op Fl t | Fl -terse
158.Op Fl o Ar string | Fl -column-info= Ns Ar string
159.Ar principal...
160.Bd -ragged -offset indent
161Lists the matching principals, short prints the result as a table,
162while long format produces a more verbose output. Which columns to
163print can be selected with the
164.Fl o
165option. The argument is a comma separated list of column names
166optionally appended with an equal sign
167.Pq Sq =
168and a column header. Which columns are printed by default differ
169slightly between short and long output.
170.Pp
171The default terse output format is similar to
172.Fl s o Ar principal= ,
173just printing the names of matched principals.
174.Pp
175Possible column names include:
176.Li principal ,
177.Li princ_expire_time ,
178.Li pw_expiration ,
179.Li last_pwd_change ,
180.Li max_life ,
181.Li max_rlife ,
182.Li mod_time ,
183.Li mod_name ,
184.Li attributes ,
185.Li kvno ,
186.Li mkvno ,
187.Li last_success ,
188.Li last_failed ,
189.Li fail_auth_count ,
190.Li policy ,
191and
192.Li keytypes .
193.Ed
194.Pp
195.Nm modify
196.Oo Fl a Ar attributes \*(Ba Xo
197.Fl -attributes= Ns Ar attributes
198.Xc
199.Oc
200.Op Fl -max-ticket-life= Ns Ar lifetime
201.Op Fl -max-renewable-life= Ns Ar lifetime
202.Op Fl -expiration-time= Ns Ar time
203.Op Fl -pw-expiration-time= Ns Ar time
204.Op Fl -kvno= Ns Ar number
205.Ar principal...
206.Bd -ragged -offset indent
207Modifies certain attributes of a principal. If run without command
208line options, you will be prompted. With command line options, it will
209only change the ones specified.
210.Pp
211Possible attributes are:
212.Li new-princ ,
213.Li support-desmd5 ,
214.Li pwchange-service ,
215.Li disallow-svr ,
216.Li requires-pw-change ,
217.Li requires-hw-auth ,
218.Li requires-pre-auth ,
219.Li disallow-all-tix ,
220.Li disallow-dup-skey ,
221.Li disallow-proxiable ,
222.Li disallow-renewable ,
223.Li disallow-tgt-based ,
224.Li disallow-forwardable ,
225.Li disallow-postdated
226.Pp
227Attributes may be negated with a "-", e.g.,
228.Pp
229kadmin -l modify -a -disallow-proxiable user
230.Ed
231.Pp
232.Nm passwd
233.Op Fl r | Fl -random-key
234.Op Fl -random-password
235.Oo Fl p Ar string \*(Ba Xo
236.Fl -password= Ns Ar string
237.Xc
238.Oc
239.Op Fl -key= Ns Ar string
240.Ar principal...
241.Bd -ragged -offset indent
242Changes the password of an existing principal.
243.Ed
244.Pp
245.Nm password-quality
246.Ar principal
247.Ar password
248.Bd -ragged -offset indent
249Run the password quality check function locally.
250You can run this on the host that is configured to run the kadmind
251process to verify that your configuration file is correct.
252The verification is done locally, if kadmin is run in remote mode,
253no rpc call is done to the server.
254.Ed
255.Pp
256.Nm privileges
257.Bd -ragged -offset indent
258Lists the operations you are allowed to perform. These include
259.Li add ,
260.Li add_enctype ,
261.Li change-password ,
262.Li delete ,
263.Li del_enctype ,
264.Li get ,
265.Li list ,
266and
267.Li modify .
268.Ed
269.Pp
270.Nm rename
271.Ar from to
272.Bd -ragged -offset indent
273Renames a principal. This is normally transparent, but since keys are
274salted with the principal name, they will have a non-standard salt,
275and clients which are unable to cope with this will fail. Kerberos 4
276suffers from this.
277.Ed
278.Pp
279.Nm check
280.Op Ar realm
281.Pp
282.Bd -ragged -offset indent
283Check database for strange configurations on important principals. If
284no realm is given, the default realm is used.
285.Ed
286.Pp
287When running in local mode, the following commands can also be used:
288.Pp
289.Nm dump
290.Op Fl d | Fl -decrypt
291.Op Ar dump-file
292.Bd -ragged -offset indent
293Writes the database in
294.Dq human readable
295form to the specified file, or standard out. If the database is
296encrypted, the dump will also have encrypted keys, unless
297.Fl -decrypt
298is used.
299.Ed
300.Pp
301.Nm init
302.Op Fl -realm-max-ticket-life= Ns Ar string
303.Op Fl -realm-max-renewable-life= Ns Ar string
304.Ar realm
305.Bd -ragged -offset indent
306Initializes the Kerberos database with entries for a new realm. It's
307possible to have more than one realm served by one server.
308.Ed
309.Pp
310.Nm load
311.Ar file
312.Bd -ragged -offset indent
313Reads a previously dumped database, and re-creates that database from
314scratch.
315.Ed
316.Pp
317.Nm merge
318.Ar file
319.Bd -ragged -offset indent
320Similar to
321.Nm load
322but just modifies the database with the entries in the dump file.
323.Ed
324.Pp
325.Nm stash
326.Oo Fl e Ar enctype \*(Ba Xo
327.Fl -enctype= Ns Ar enctype
328.Xc
329.Oc
330.Oo Fl k Ar keyfile \*(Ba Xo
331.Fl -key-file= Ns Ar keyfile
332.Xc
333.Oc
334.Op Fl -convert-file
335.Op Fl -master-key-fd= Ns Ar fd
336.Bd -ragged -offset indent
337Writes the Kerberos master key to a file used by the KDC.
338.Ed
339.\".Sh ENVIRONMENT
340.\".Sh FILES
341.\".Sh EXAMPLES
342.\".Sh DIAGNOSTICS
343.Sh SEE ALSO
344.Xr kadmind 8 ,
345.Xr kdc 8
346.\".Sh STANDARDS
347.\".Sh HISTORY
348.\".Sh AUTHORS
349.\".Sh BUGS
350