.\" ----------------------------------------------------------------------- .\" .\" Copyright 1994-2008 H. Peter Anvin - All Rights Reserved .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, .\" Boston MA 02110-1301, USA; either version 2 of the License, or .\" (at your option) any later version; incorporated herein by reference. .\" .\" ----------------------------------------------------------------------- .TH RANPWD 1 "28 June 2008" "H. Peter Anvin" .SH NAME ranpwd \- generate random passwords .SH SYNOPSIS .B ranpwd [options] [length] .SH DESCRIPTION .B ranpwd generates random passwords. On Linux, it will use the kernel-based true random number generator to generate cryptographically secure passwords. .PP If .I length is not given, it defaults to 8 characters unless specified below. .SS OPTIONS .TP \fB\-\-ascii\fR Allow any printable ASCII character except space. This is the default. .TP \fB\-a\fR, \fB\-\-alphanum\fR Generate mixed-case alphanumeric passwords. .TP \fB\-l\fR, \fB\-\-alphanum \-\-lower\fR Generate lower-case alphanumeric passwords. .TP \fB\-u\fR, \fB\-\-alphanum \-\-upper\fR Generate upper-case alphanumberic passwords. .TP \fB\-A\fR, \fB\-\-alpha\fR Generate mixed-case alphabetic passwords. .TP \fB\-L\fR, \fB\-\-alpha \-\-lower\fR Generate lower-case alphabetic passwords. .TP \fB\-U\fR, \fB\-\-alpha \-\-upper\fR Generate upper-case alphabetic passwords. .TP \fB\-x\fR, \fB\-\-hexadecimal \-\-lower\fR Generate lower-case hexadecimal numbers. .TP \fB\-X\fR, \fB\-\-hexadecimal \-\-upper\fR Generate upper-case hexadecimal numbers. .TP \fB\-d\fR, \fB\-\-decimal\fR Generate decimal numbers. .TP \fB\-o\fR, \fB\-\-octal\fR Generate octal numbers. .TP \fB\-b\fR, \fB\-\-binary\fR Generate a bit string (for Bynar sabotage teams.) .TP \fB\-i\fR, \fB\-\-ip\fR Generate a random IP suffix (normally used with a .B 169.254. prefix). The first octet cannot be 0 or 255. Length is given in octets; the default is two octets. .TP \fB\-m\fR, \fB\-\-mac-address\fR Generate a random MAC address. The first octet must have the multicast bit clear, and the local bit set. Length is given in octets; the default is six octets. .TP \fB\-M\fR, \fB\-\-mac-address \-\-upper\fR Generate an upper case random MAC address. The first octet must have the multicast bit clear, and the local bit set. Length is given in octets; the default is six octets. .TP \fB\-g\fR, \fB\-\-uuid\fR, \fB\-\-guid\fR Generate a random Universally Unique Identifier (UUID). Length is given in the number of UUIDs to output; the default is one UUID. .TP \fB\-g\fR, \fB\-\-uuid \-\-upper\fR, \fB\-\-guid \-\-upper\fR Generate an upper case random Universally Unique Identifier (UUID). Length is given in the number of UUIDs to output; the default is one UUID. .TP \fB\-s\fR, \fB\-\-secure\fR On systems which have .I /dev/random support, use .I /dev/random to generate passwords rather than .IR /dev/urandom . This is more secure, but may be slower, as the process will block rather than degrade to a PRNG if true random numbers are temporarily unavailable. Using .B \-\-secure on a system without .I /dev/random support results in an error message. .TP \fB\-c\fR, \fB\-\-c\fR For octal numbers, preceed with .I 0; for hexadecimal numbers, preceed with .I 0x; for decimal numbers, strip leading zeros; for all others, enclose in double quotes and \\-escape quotes and backslashes if present in the output. This will ensure that the output is always a valid C language constant. The .I length parameter on the command line is always number of significant digits, not the length of the output. .SS AUTHOR H. Peter Anvin