MAN page from Mandriva 2010 apg-2.2.3-5mdv2010.0.i586.rpm
Section: User Manual (1)
Updated: 2003 Aug 04Index
apg- generates several random passwords
] [-M mode
] [-E char_string
] [-m min_pass_len
] [-x max_pass_len
] [-b filter_file
] [-p min_substr_len
] [-c cl_seed
generates several random passwords. It uses several password generationalgorithms (currently two) and a built-in pseudo random number generator.
Default algorithm is pronounceable password generation algorithmdesigned byMorrie Gasserand described inA Random Word Generator For Pronounceable PasswordsNational Technical Information Service (NTIS)AD-A-017676.The original paper is very old and had never been put online,so I have to useNISTimplementation described in FIPS-181.
Another algorithm is simple random character generation algorithm, but ituses four user-defined symbol sets to produce random password. It means thatuser can choose type of symbols that should appear in password. Symbol setsare: 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 algorithmdescribed inAppendix C of ANSI X9.17orRFC1750with exception that it usesCASTorSHA-1instead ofTriple DES.It uses local time with precision of microseconds (seegettimeofday(2)) and /dev/random (if available) to produceinitial random seed.
apgalso have the ability to check generated password quality usingdictionary. You can use this ability if you specify command-line options-rdictfileor-bfilternamewhere dictfile is the dictionary file name and filtername is thename 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 withdictionary password crackers.Bloom filter file should be created with apgbfm(1) utility includedin apg distribution. In future releases I plan to implement some othertechniques to check passwords (like pattern check) just to make life easier.
Password generation modes options
- -a algorithm
- use algorithmfor password generation.
- 0- (default) pronounceable password generation
1- random character password generation
- -n num_of_pass
- generate num_of_passnumber of passwords. Default is 6.
- -m min_pass_len
- generate password with minimum length min_pass_len.If min_pass_len > max_pass_len then max_pass_len = min_pass_len.Default minimum password length is 8.
- -x max_pass_len
- generate password with maximum length max_pass_len.If min_pass_len > max_pass_len then max_pass_len = min_pass_len.Default maximum password length is 10.
- -M mode
- Use symbolsets specified with mode for password generation.mode is a text string consisting of characters S, s, N, n,C, c, L, l. Where:
- generator must use special symbol set for every generated password.
- generator should use special symbol set for password generation.
- generator must use numeral symbol set for every generated password.
- generator should use numeral symbol set for password generation.
- generator must use capital symbol set for every generated password.
- generator should use capital symbol set for password generation.
- generator must use small letters symbol set for every generated password(always present if pronounceable passwordgeneration algorithm is used).
- generator should use small letters symbol set for password generation.
- not supported any more. Use -E char_string option instead.
mode can not be more than 4 characters inlength.
Usage of L, M, N, C will slow down password generation process.
-M sncl or -M SNCL or -M Cn
- -E char_string
- exclude characters in char_string from password generation process (in pronounceablepassword generation mode you can not exclude small letters). To include special symbols thatcan be recognized by shell (apostrophe, quotes, dollar sign, etc.) in char_string usethe backslashed versions.
Command apg -a 1 -M n -n 3 -m 8 -E 23456789 will generate a set of passwords thatwill look like this
Command apg -a 1 -M nc -n 3 -m 26 -E GHIJKLMNOPQRSTUVWXYZ will generate a set of passwordsthat will look like this
Password quality control options
- -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 generatedpassword for appearance in filter_file. If any of such substrings wouldbe found in the filter_file then generated password would be rejectedand apg(1) will generate another one.min_substr_len specifies minimum substring length to check.This option is active only if -b option is defined.
Pseudo random number generator options
- ask user for random sequence for password generation
- -c cl_seed
- usecl_seedas a random seed for password generation. I use it when i have to generatepasswords in a shell script.
Password output options
- do NOT use any delimiters between generated passwords. I use it when i have to generatepasswords in a shell script.
- print generated passwords and crypted passwords (see man crypt(3))
- quiet mode (do not print warnings)
- spell genetated passwords. Useful when you want to read generated password by telephone.
- WARNING:Think twice before read your password by phone.
- print pronunciation for generated pronounceable password
- print help information and exit
- print version information and exit
DEFAULT OPTIONSapg -a 0 -M sncl -n 6 -x 10 -m 8
If you want to generate really secure passwords,you should use option -s. To simplifyapgusage, you can write a small shell script. For example:
/usr/local/bin/apg -m 8 -x 12 -s
[ end ]----> pwgen.sh
On successful completion of its task,apg
will complete with exit code 0. An exit code of -1 indicates an erroroccurred. Textual errors are written to the standard error stream.
is not available, apg
will display amessage about it.
If you've found one, please send bug description to the author.
Adel I. Mirzazhanov, <a-delAATTiname.com>
Project home page: http://www.adel.nursat.kz/apg/
- Password generation modes options
- Password quality control options
- Pseudo random number generator options
- Password output options
- DEFAULT OPTIONS
- EXIT CODE
- SEE ALSO
This document was created byman2html,using the manual pages.