xref: /openbsd/sbin/fsirand/fsirand.8 (revision 5af055cd)
1.\" $OpenBSD: fsirand.8,v 1.31 2015/11/23 19:44:57 mmcc Exp $
2.\"
3.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: November 23 2015 $
18.Dt FSIRAND 8
19.Os
20.Sh NAME
21.Nm fsirand
22.Nd randomize inode generation numbers
23.Sh SYNOPSIS
24.Nm fsirand
25.Op Fl bfp
26.Ar special ...
27.Sh DESCRIPTION
28The
29.Nm
30command installs random generation numbers on all the inodes for
31each filesystem specified on the command line by
32.Ar special .
33This increases the security of NFS-exported filesystems by making
34it difficult to
35.Dq guess
36filehandles.
37.Pp
38.Em Note :
39.Xr newfs 8
40now does the equivalent of
41.Nm
42itself so it is no longer necessary to
43run
44.Nm
45by hand on a new filesystem.
46It is only used to re-randomize or report on an existing filesystem.
47.Pp
48.Nm
49should only be used on an unmounted filesystem that
50has been checked with
51.Xr fsck 8
52or a filesystem that is mounted read-only.
53.Nm
54may be used on the root filesystem in single-user mode
55but the system should be rebooted via
56.Dq reboot -n
57afterwards.
58.Pp
59The options are as follows:
60.Bl -tag -width Ds
61.It Fl b
62Use the default block size (usually 512 bytes) instead
63of the value gleaned from the disklabel.
64.It Fl f
65Force
66.Nm
67to run even if the filesystem on
68.Ar special
69is not marked as clean.
70.It Fl p
71Print the current generation numbers for all inodes instead of
72generating new ones.
73.El
74.Sh SEE ALSO
75.Xr fs 5 ,
76.Xr fsck 8 ,
77.Xr newfs 8 ,
78.Xr reboot 8
79.Sh HISTORY
80The
81.Nm
82command appeared in SunOS 3.x.
83This version of
84.Nm
85first appeared in
86.Ox 2.1 .
87.Sh AUTHORS
88.An Todd C. Miller
89.Sh CAVEATS
90Since
91.Nm
92allocates enough memory to hold all the inodes in
93a given cylinder group, it may use a large amount
94of memory for large disks with few cylinder groups.
95