2007-01-25 07:40:21 +01:00
|
|
|
mkpasswd.c documentation
|
|
|
|
|
|
|
|
This is documentation for the updated mkpasswd.c included with a number
|
|
|
|
of ircd, irc services, and non-IRC related programs
|
|
|
|
|
2011-01-06 06:20:04 +01:00
|
|
|
This version of mkpasswd can create DES, Extended DES, Blowfish, and MD5
|
2007-01-25 07:40:21 +01:00
|
|
|
passwords, with either randomly generated or user provided salts.
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-m Generate an MD5 password
|
|
|
|
-d Generate a DES password
|
2011-01-06 06:20:04 +01:00
|
|
|
-b Generate a Blowfish password
|
2007-01-25 07:40:21 +01:00
|
|
|
-e Generate an Extended (BSDi) DES password
|
2011-01-06 06:20:04 +01:00
|
|
|
-l Specify a length for a random MD5 or Blowfish salt
|
|
|
|
-r Specify a number of rounds for a Blowfish or Extended DES password
|
|
|
|
Blowfish: no more than 6 recommended, no less than 4 accepted
|
2007-01-25 07:40:21 +01:00
|
|
|
Extended DES: default of 25
|
|
|
|
-s Specify a salt, 2 alphanumeric characters for DES, up to 16 for MD5,
|
2011-01-06 06:20:04 +01:00
|
|
|
up to 22 for Blowfish, 2 for Extended DES
|
2007-01-25 07:40:21 +01:00
|
|
|
-p Specify a plaintext password to use
|
|
|
|
-? Get brief help
|
|
|
|
-h Get extended help
|
|
|
|
|
|
|
|
Without the presence of any parameters, it'll behave like the old mkpasswd,
|
|
|
|
creating a DES password with a randomly generated salt and prompting for
|
|
|
|
the password (without echo).
|
|
|
|
|
|
|
|
A DES salt is a pair of alphanumeric characters ('.' and '/' are permitted
|
|
|
|
as well), such as 'a4' or 'Td'.
|
|
|
|
|
|
|
|
An MD5 salt consists of up to 16 (though most implementations limit you to
|
|
|
|
8) alphanumeric characters (plus '.' and '/'),
|
|
|
|
such as 'tGd' or 'J6d4dfG'.
|
|
|
|
|
2011-01-06 06:20:04 +01:00
|
|
|
A Blowfish salt consists of up to 22 alphanumeric characters (plus '.' and
|
|
|
|
'/'). Blowfish also specifies a number of rounds*, by default 4.
|
2007-01-25 07:40:21 +01:00
|
|
|
|
|
|
|
Known bugs:
|
|
|
|
The encryption algorithms supported depend on your system's crypt()
|
|
|
|
implementation.
|
|
|
|
The maximum length of an MD5 salt is limited to your systems crypt()
|
|
|
|
implementation, typically 8.
|
|
|
|
|
|
|
|
Supported Platforms (Known and tested):
|
|
|
|
Linux glibc (DES and MD5)
|
|
|
|
FreeBSD 3.x (DES (MD5 maybe))
|
2011-01-06 06:20:04 +01:00
|
|
|
FreeBSD 4.x (DES, MD5, Blowfish, Extended DES)
|
2007-01-25 07:40:21 +01:00
|
|
|
Solaris 2.5-2.6 (DES only)
|
|
|
|
Cygwin 1.1.4 (DES only)
|
|
|
|
Prior Cygwin with the MD5 libcrypt (MD5 only)
|
|
|
|
OpenBSD 2.7 (don't link with -lcrypt) (DES, MD5, Blowfish)
|
|
|
|
Mac OS-X (Darwin) (don't link with -lcrypt) (DES only)
|
|
|
|
|
|
|
|
An MMK build script is included, as well as an MD5 crypt() implementation
|
|
|
|
|
|
|
|
Other systems probably work, but they haven't been amply tested.
|
|
|
|
|
2011-01-06 06:20:04 +01:00
|
|
|
* Blowfish's rounds parameter is a logarithm, not an integer value
|