1APG(1)                            User Manual                           APG(1)
2
3
4

NAME

6       apg - generates several random passwords
7
8

SYNOPSIS

10       apg  [-a  algorithm]  [-M  mode]  [-E char_string] [-n num_of_pass] [-m
11       min_pass_len] [-x max_pass_len]  [-r  dictfile]  [-b  filter_file]  [-p
12       min_substr_len]  [-s]  [-c  cl_seed] [-d] [-y] [-l] [-t] [-k] [-q] [-h]
13       [-v]
14

DESCRIPTION

16       apg generates several random passwords. It uses several password gener‐
17       ation  algorithms  (currently  two) and a built-in pseudo random number
18       generator.
19
20       Default  algorithm  is  pronounceable  password  generation   algorithm
21       designed  by Morrie Gasser and described in A Random Word Generator For
22       Pronounceable Passwords National Technical Information  Service  (NTIS)
23       AD-A-017676.   The  original  paper  is very old and had never been put
24       online, so I have to use NIST implementation described in FIPS-181.
25
26       Another algorithm is simple random character generation algorithm,  but
27       it  uses  four  user-defined symbol sets to produce random password. It
28       means that user can choose type of symbols that should appear in  pass‐
29       word.  Symbol  sets are: numeric symbol set (0,...,9) , capital letters
30       symbol set (A,...,Z) , small letters symbol set (a,...,z)  and  special
31       symbols symbol set (#,@,!,...).
32
33       Built-in  pseudo  random number generator is an implementation of algo‐
34       rithm described in Appendix C of ANSI X9.17 or RFC1750  with  exception
35       that  it  uses CAST or SHA-1 instead of Triple DES.  It uses local time
36       with precision of microseconds (see  gettimeofday(2))  and  /dev/random
37       (if available) to produce initial random seed.
38
39       apg  also  have  the  ability to check generated password quality using
40       dictionary. You can  use  this  ability  if  you  specify  command-line
41       options  -r  dictfile or -b filtername where dictfile is the dictionary
42       file name and filtername is the name of Bloom filter file. In that dic‐
43       tionary  you  may  place words (one per line) that should not appear as
44       generated passwords. For example: user names, common  words,  etc.  You
45       even can use one of the dictionaries that come with dictionary password
46       crackers.  Bloom filter file should be created with  apgbfm(1)  utility
47       included  in  apg  distribution. In future releases I plan to implement
48       some other techniques to check passwords (like pattern check)  just  to
49       make life easier.
50
51

OPTIONS

53   Password generation modes options
54       -a algorithm
55              use algorithm for password generation.
56              0 - (default) pronounceable password generation
57              1 - random character password generation
58
59       -n num_of_pass
60              generate num_of_pass number of passwords. Default is 6.
61
62       -m min_pass_len
63              generate   password   with   minimum  length  min_pass_len.   If
64              min_pass_len > max_pass_len then  max_pass_len  =  min_pass_len.
65              Default minimum password length is 8.
66
67       -x max_pass_len
68              generate   password   with   maximum  length  max_pass_len.   If
69              min_pass_len > max_pass_len then  max_pass_len  =  min_pass_len.
70              Default maximum password length is 10.
71
72       -M mode
73              Use  symbolsets  specified  with  mode  for password generation.
74              mode is a text string consisting of characters S, s, N, n, C, c,
75              L, l. Where:
76
77              S      generator must use special symbol set for every generated
78                     password.
79
80              s      generator should use special symbol set for password gen‐
81                     eration.
82
83              N      generator must use numeral symbol set for every generated
84                     password.
85
86              n      generator should use numeral symbol set for password gen‐
87                     eration.
88
89              C      generator must use capital symbol set for every generated
90                     password.
91
92              c      generator should use capital symbol set for password gen‐
93                     eration.
94
95              L      generator  must  use  small  letters symbol set for every
96                     generated password (always present if pronounceable pass‐
97                     word generation algorithm is used).
98
99              l      generator  should  use small letters symbol set for pass‐
100                     word generation.
101
102              R,r    not  supported  any  more.  Use  -E  char_string   option
103                     instead.
104              mode can not be more than 4 characters in length.
105
106              Note:
107              Usage of L, M, N, C will slow down password generation process.
108
109              Examples:
110              -M sncl or -M SNCL or -M Cn
111
112       -E char_string
113              exclude  characters  in  char_string  from  password  generation
114              process (in pronounceable password generation mode you  can  not
115              exclude  small  letters). To include special symbols that can be
116              recognized by shell (apostrophe, quotes, dollar sign,  etc.)  in
117              char_string use the backslashed versions.
118
119              Examples:
120
121              Command  apg -a 1 -M n -n 3 -m 8 -E 23456789 will generate a set
122              of passwords that will look like this
123              10100110
124              01111000
125              11011101
126
127              Command apg -a 1 -M nc -n 3 -m 26 -E  GHIJKLMNOPQRSTUVWXYZ  will
128              generate a set of passwords that will look like this
129              16A1653CD4DE5E7BD9584A3476
130              C8F78E06944AFD57FB9CB882BC
131              8C8DF37CD792D36D056BBD5002
132
133   Password quality control options
134       -k     check every generated password using cracklib. To use this abil‐
135              ity you must enable cracklib support during programm building.
136
137       -r dictfile
138              check generated passwords for their appearance in dictfile
139
140       -b filter_file
141              check generated passwords for their appearance  in  filter_file.
142              filter_file should be created with apgbfm(1) utility.
143
144       -p min_substr_len
145              this  option tells apg(1) to check every substring of the gener‐
146              ated password for appearance in filter_file. If any of such sub‐
147              strings  would  be found in the filter_file then generated pass‐
148              word would be rejected and apg(1)  will  generate  another  one.
149              min_substr_len  specifies  minimum  substring  length  to check.
150              This option is active only if -b option is defined.
151
152   Pseudo random number generator options
153       -s     ask user for random sequence for password generation
154
155       -c cl_seed
156              use cl_seed as a random seed for password generation. I  use  it
157              when i have to generate passwords in a shell script.
158
159   Password output options
160       -d     do  NOT use any delimiters between generated passwords. I use it
161              when i have to generate passwords in a shell script.
162
163       -y     print  generated  passwords  and  crypted  passwords  (see   man
164              crypt(3))
165
166       -q     quiet mode (do not print warnings)
167
168       -l     spell  genetated  passwords. Useful when you want to read gener‐
169              ated password by telephone.
170              WARNING: Think twice before read your password by phone.
171
172       -t     print pronunciation for generated pronounceable password
173
174       -h     print help information and exit
175
176       -v     print version information and exit
177

DEFAULT OPTIONS

179       apg -a 0 -M sncl -n 6 -x 10 -m 8 (new style)
180
181       If you want to generate really secure passwords, you should use  option
182       -s.  To  simplify  apg  usage,  you can write a small shell script. For
183       example:
184       [begin]----> pwgen.sh
185       #!/bin/sh
186       /usr/local/bin/apg -m 8 -x 12 -s
187       [ end ]----> pwgen.sh
188

EXIT CODE

190       On successful completion of its task, apg will complete with exit  code
191       0.  An exit code of -1 indicates an error occurred.  Textual errors are
192       written to the standard error stream.
193

DIAGNOSTICS

195       If /dev/random is not available, apg will display a message about it.
196

FILES

198       None.
199

BUGS

201       None.  If you've found one, please send bug description to the author.
202

SEE ALSO

204       apgd(8), apgbfm(1)
205

AUTHOR

207       Adel I. Mirzazhanov, <a-del@iname.com>
208       Project home page: http://www.adel.nursat.kz/apg/
209
210
211
212Automated Password Generator      2003 Aug 04                           APG(1)
Impressum