aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsirand/fsirand.8
blob: 66a1724303cb1490edd2f6be142a5f353b69402f (plain) (blame)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgment:
.\"	This product includes software developed by Todd C. Miller.
.\" 4. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"	$OpenBSD: fsirand.8,v 1.6 1997/02/23 03:58:26 millert Exp $
.\" $FreeBSD$
.\"
.Dd January 25, 1997
.Dt FSIRAND 8
.Os
.Sh NAME
.Nm fsirand
.Nd randomize inode generation numbers
.Sh SYNOPSIS
.Nm
.Op Fl b
.Op Fl f
.Op Fl p
.Ar special
.Op Ar "special ..."
.Sh DESCRIPTION
The
.Nm
utility installs random generation numbers on all the inodes for
each file system specified on the command line by
.Ar special .
This increases the security of NFS-exported file systems by making
it difficult to ``guess'' filehandles.
.Pp
.Em Note :
.Xr newfs 8
now does the equivalent of
.Nm
itself so it is no longer necessary to
run
.Nm
by hand on a new file system.
It is only used to
re-randomize or report on an existing file system.
.Pp
The
.Nm
utility should only be used on an unmounted file system that
has been checked with
.Xr fsck 8
or a file system that is mounted read-only.
The
.Nm
utility may be used on the root file system in single-user mode
but the system should be rebooted via ``reboot -n'' afterwards.
.Sh OPTIONS
.Bl -tag -width indent
The available options are as follows:
.It Fl b
Use the default block size (usually 512 bytes) instead
of the value gleaned from the disklabel.
.It Fl f
Force
.Nm
to run even if the file system on
.Ar special
is not marked as clean.
.It Fl p
Print the current generation numbers for all inodes instead of
generating new ones.
.El
.Sh SEE ALSO
.Xr fs 5 ,
.Xr fsck 8 ,
.Xr newfs 8
.Sh HISTORY
The
.Nm
utility appeared in SunOS 3.x.
.Pp
This version of
.Nm
first appeared in
.Ox 2.1 .
.Pp
A
.Fx
version first appeared in
.Fx 2.2.5 .
.Sh AUTHORS
.An Todd C. Miller Aq Todd.Miller@courtesan.com
.Sh CAVEATS
Since
.Nm
allocates enough memory to hold all the inodes in
a given cylinder group it may use a large amount
of memory for large disks with few cylinder groups.