makepasswd
<?xml version="1.0" encoding="UTF-8"?>
							<!-- $Id: makepasswd.xml,v 1.6 2012/10/16 14:54:53 khorben Exp $ -->
							<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
							"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
								<!ENTITY firstname "Pierre">
								<!ENTITY surname   "Pronchery">
								<!ENTITY username  "khorben">
								<!ENTITY email     "khorben@defora.org">
								<!ENTITY section   "1">
								<!ENTITY title     "makepasswd User Manual">
								<!ENTITY package   "DeforaOS makepasswd">
								<!ENTITY name      "makepasswd">
								<!ENTITY purpose   "Generates (pseudo-)random passwords and hashes">
							]>
							<refentry>
								<refentryinfo>
									<title>&title;</title>
									<productname>&package;</productname>
									<authorgroup>
										<author>
											<firstname>&firstname;</firstname>
											<surname>&surname;</surname>
											<contrib>Code and documentation.</contrib>
											<address>
												<email>&email;</email>
											</address>
										</author>
										<author>
											<firstname>Gabor Z.</firstname>
											<surname>papp</surname>
											<contrib>Testing.</contrib>
											<address>
												<email>gzp@papp.hu</email>
											</address>
										</author>
									</authorgroup>
									<copyright>
										<year>2012</year>
										<holder>&firstname; &surname; <&email;></holder>
									</copyright>
									<legalnotice>
										<para>This manual page was written for the DeforaOS project (and may be
											used by others).</para>
										<para>Permission is granted to copy, distribute and/or modify this
											document under the terms of the GNU General Public License,
											Version 3 as published by the Free Software Foundation.</para>
									</legalnotice>
								</refentryinfo>
								<refmeta>
									<refentrytitle>&name;</refentrytitle>
									<manvolnum>§ion;</manvolnum>
								</refmeta>
								<refnamediv>
									<refname>&name;</refname>
									<refpurpose>&purpose;</refpurpose>
								</refnamediv>
								<refsynopsisdiv>
									<cmdsynopsis>
										<command>&name;</command>
										<arg choice="opt"><option>-c <replaceable>string</replaceable></option></arg>
										<arg choice="opt"><option>-e <replaceable>algorithm</replaceable></option></arg>
										<arg choice="opt"><option>-i <replaceable>iterations</replaceable></option></arg>
										<arg choice="opt"><option>-l <replaceable>length</replaceable></option></arg>
										<arg choice="opt"><option>-M <replaceable>maximum length</replaceable></option></arg>
										<arg choice="opt"><option>-m <replaceable>minimum length</replaceable></option></arg>
										<arg choice="opt"><option>-n <replaceable>count</replaceable></option></arg>
										<arg choice="opt"><option>-p <replaceable>password</replaceable></option></arg>
										<arg choice="opt"><option>-S</option></arg>
										<arg choice="opt"><option>-s <replaceable>salt</replaceable></option></arg>
									</cmdsynopsis>
									<cmdsynopsis>
										<command>&name;</command>
										<arg choice="opt"><option>-E</option></arg>
										<arg choice="opt"><option>-c <replaceable>string</replaceable></option></arg>
										<arg choice="opt"><option>-e <replaceable>algorithm</replaceable></option></arg>
										<arg choice="opt"><option>-i <replaceable>iterations</replaceable></option></arg>
										<arg choice="opt"><option>-l <replaceable>length</replaceable></option></arg>
										<arg choice="opt"><option>-M <replaceable>maximum length</replaceable></option></arg>
										<arg choice="opt"><option>-m <replaceable>minimum length</replaceable></option></arg>
										<arg choice="opt"><option>-n <replaceable>count</replaceable></option></arg>
										<arg choice="opt"><option>-S</option></arg>
										<arg choice="opt"><option>-s <replaceable>salt</replaceable></option></arg>
									</cmdsynopsis>
								</refsynopsisdiv>
								<refsect1 id="description">
									<title>Description</title>
									<para><command>&name;</command> is a program that generates pseudo-random
										passwords of a desired length and, if so desired, along with their
										corresponding hashes for a given encryption algorithm.</para>
								</refsect1>
								<refsect1 id="options">
									<title>Options</title>
									<para>The following options are available:</para>
									<variablelist>
										<varlistentry>
											<term><option>-E</option></term>
											<listitem>
												<para>In this operation mode, <command>&name;</command>
													enumerates through all possible values for a password,
													given the list of characters allowed and the length
													specified.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-c <replaceable>string</replaceable></option></term>
											<listitem>
												<para>Sets the string of characters allowed within passwords, when
													generating them randomly.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-e</option></term>
											<listitem>
												<para>Apply a specific hashing algorithm to the password
													generated. The list of passwords currently supported
													is:<itemizedlist>
														<listitem><para>base64 (always supported)</para></listitem>
														<listitem><para>blowfish (Blowfish)</para></listitem>
														<listitem><para>des (single DES)</para></listitem>
														<listitem><para>md5 (MD5, always supported)</para></listitem>
														<listitem><para>sha1 (SHA-1)</para></listitem>
														<listitem><para>sha256 (SHA-256)</para></listitem>
														<listitem><para>shmd5 (shadow MD5)</para></listitem>
														<listitem><para>none (always supported)</para></listitem>
												</itemizedlist></para>
												<para>For the algorithms not explicitly mentioned as always supported,
													their availability depends on the implementation of the
													<citerefentry> <refentrytitle>crypt</refentrytitle>
														<manvolnum>3</manvolnum> </citerefentry> library on the system
													where <command>&name;</command> was compiled.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-i</option></term>
											<listitem>
												<para>Force a number of iterations to be performed when hashing
													passwords, for algorithms effectively supporting it. It otherwise
													defaults to a random value, in a range considered reasonable for the
													hashing algorithm selected.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-i</option></term>
											<listitem>
												<para>Force a number of iterations to be performed when hashing
													passwords, for algorithms effectively supporting it. It otherwise
													defaults to a random value, in a range considered reasonable for the
													hashing algorithm selected.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-l</option></term>
											<listitem>
												<para>Force the passwords generated to be of a fixed length.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-M</option></term>
											<listitem>
												<para>Maximum length for the passwords generated.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-m</option></term>
											<listitem>
												<para>Minimum length for the passwords generated.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-n</option></term>
											<listitem>
												<para>Total number of passwords to generate. When not set, it defaults
												to only one, except in enumeration mode where it processes the
												complete range of possibilities until exhaustion.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-p</option></term>
											<listitem>
												<para>Force a given value for the password generated. This is useful
													when generating hashes for pre-determined passwords.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-S</option></term>
											<listitem>
												<para>Do not seed the PRNG (pseudo-random number generator) ourselves.
													With this option <emphasis>set</emphasis>, the entropy pool is often
													<emphasis>not</emphasis> initialized, and the passwords generated
													<emphasis>predictable</emphasis> as a result.</para>
												<para>Use this option carefully, when you know that either the system does
													provide better entropy than &name;, or that it hurts performance in a
													situation where entropy is not required.</para>
											</listitem>
										</varlistentry>
										<varlistentry>
											<term><option>-s</option></term>
											<listitem>
												<para>Force a given value when salting the resulting password hash.
													This is only useful when selecting a hashing algorithm that
													effectively uses salt.</para>
											</listitem>
										</varlistentry>
									</variablelist>
								</refsect1>
								<refsect1 id="bugs">
									<title>Bugs</title>
									<para>Issues can be listed and reported at <ulink
											url="http://www.defora.org/os/project/bug_list/117/makepasswd"/>.</para>
								</refsect1>
								<refsect1 id="see_also">
									<title>See also</title>
									<para><citerefentry>
											<refentrytitle>login</refentrytitle>
											<manvolnum>1</manvolnum>
											</citerefentry>, <citerefentry>
											<refentrytitle>passwd</refentrytitle>
											<manvolnum>1</manvolnum>
									</citerefentry></para>
								</refsect1>
							</refentry>
							<!-- vim: set noet ts=1 sw=1 sts=1 tw=80: -->
							