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