1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
.\" $OpenBSD: skeyprune.8,v 1.13 2019/01/25 00:19:26 millert Exp $
.\"
.\" Copyright (c) 1996, 2001, 2002 Todd C. Miller <millert@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: January 25 2019 $
.Dt SKEYPRUNE 8
.Os
.Sh NAME
.Nm skeyprune
.Nd prune zeroed and old entries from S/Key database
.Sh SYNOPSIS
.Nm skeyprune
.Op Ar days
.Sh DESCRIPTION
.Nm skeyprune
searches through the S/Key database,
.Pa /etc/skey ,
and prunes out entries that have been zeroed out via
.Xr skeyinit 1
as well as entries that have not been modified in
.Ar days
days.
If
.Ar days
is not specified, only invalid entries are pruned.
.Pp
If a malformed entry is encountered, or if the file mode/type is incorrect,
an error is printed to the standard error.
.Sh FILES
.Bl -tag -width /etc/skey
.It Pa /etc/skey
directory containing S/Key user entries
.El
.Sh DIAGNOSTICS
The following errors are cause for concern.
.Bl -tag -width Ds
.It Can't cd to /etc/skey
The S/Key database directory,
.Pa /etc/skey ,
does not exist.
The superuser may create it by running
.Dq skeyinit -E .
.It Can't open user
The user's entry was found in
.Pa /etc/skey
but it could not be opened.
.It user is not a regular file
The user's entry is not a regular file.
.It Bad mode for user
The user's entry had a bad file mode (should be 0600).
.It Bad link count for user.
The user's entry had a bad link count (should be 1).
.It Invalid entry for user
The user's entry was not of the correct format, as specified by
.Xr skey 5 .
.El
.Sh SEE ALSO
.Xr skey 1 ,
.Xr skeyinit 1 ,
.Xr skey 5
|