apgd program is a server that supports
Password Generation Protocol described in
RFC972. It uses several password generation algorithms (currently two) and a built-in
pseudo random number generator.

apgd is normally invoked by the Internet superserver (see
inetd (8)) for requests to connect to the pwdgen port (pwdgen port is 129 according to
RFC1700 ) as indicated by the
/etc/services file (see
services (5)).

Default algorithm is pronounceable password generation algorithm
designed by
Morrie Gasser and described in
A Random Word Generator For Pronounceable Passwords National Technical Information Service (NTIS)AD-A-017676. The original paper is very old and had never been put online,
so I have to use
NIST implementation described in
FIPS-181.

Another algorithm is simple random character generation algorithm, but it
uses four user-defined symbol sets to produce random password. It means that
user can choose type of symbols that should appear in password. Symbol sets
are: numeric symbol set
(0,...,9) , capital letters symbol set
(A,...,Z) , small letters symbol set
(a,...,z) and special symbols symbol set
(#,@,!,...).

Built-in pseudo random number generator is an implementation of algorithm
described in
Appendix C of ANSI X9.17 or
RFC1750 with exception that it uses
CAST or
SHA-1 instead of
Triple DES. It uses local time with precision of microseconds (see
gettimeofday(2)) and /dev/random (if available) to produce
initial random seed.

apgd also have the ability to check generated password quality using
dictionary. You can use this ability if you specify command-line option
-rdictfile or
-bfiltername where dictfile is dictionary file name and filtername is the
name of Bloom filter file. In that dictionary you may place words
(one per line) that should not appear as generated passwords. For example: user names
common words, etc. You even can use one of the dictionaries that come with
dictionary password crackers. Bloom filter file should be created with apgbfm(1) utility included
in apg distribution. In future releases I plan to implement some
other techniques to check passwords just to make life easier.

apgd has the ability log user password generation activity and internal debug information. It does this
using
facility =
daemon

generator must use small letters symbol set for every generated password
(always present if pronounceable password
generation algorithm is used).

l

generator should use small letters symbol set for password generation.

R,r

not supported any more. Use -E char_string option instead.

mode can not be more than 4 characters in
length.

Note:
Usage of L, S, N, C will slow down password generation process.

Examples:-M sncl or -M SNCL or -M Cn

-E char_string

exclude characters in char_string from password generation process (in pronounceable
password generation mode you can not exclude small letters). To include special symbols
that can be recognized by shell (apostrophe, quotes, dollar sign, etc.) in char_string
use the backslashed versions.

Examples:

Command apgd -a 1 -M n -n 3 -m 8 -e 23456789 will generate a set of passwords that
will look like this
101001100111100011011101

Command apgd -a 1 -M nc -n 3 -m 26 -e GHIJKLMNOPQRSTUVWXYZ will generate a set of passwords
that will look like this
16A1653CD4DE5E7BD9584A3476C8F78E06944AFD57FB9CB882BC8C8DF37CD792D36D056BBD5002

check every generated password using cracklib. To use this ability you must
enable cracklib support during programm building.

-r dictfile

check generated passwords for their appearance in
dictfile

-b filter_file

check generated passwords for their appearance in
filter_file. filter_file should be created with apgbfm(1)
utility.

-p min_substr_len

this option tells apg(1) to check every substring of the generated
password for appearance in filter_file. If any of such substrings would
be found in the filter_file then generated password would be rejected
and apg(1) will generate another one.
min_substr_len is specifies minimum substring length to check.
This option is active only if -b option is defined.