createp(1) - Linux man page

Name

createp - Create password

Synopsis

createp option username(s)

Description

The program suggests passwords using a random number generator.

Options

-t type

selects a password type. Password types can be used to create more difficult passwords i.e. for administration purposes.

Long option: --type=type

-l length
specifies the password length, either as number or as a range (two numbers separated by minus).

Long option: --length=length

-o mode
specifies the output mode, one of the following:
default

The number of digits, special and uppercase characters in the password is specified explicitly (see below).

hex

The output contains digits and characters 'a'...'f'.

ascii85

The output contains characters 33...127 (decimal).

charset set
The output character set is specified explicitly. Each lowercase character represents all lowercase characters, each uppercase character represents all uppercase characters, each digit represents all digits.
Long option --output-mode=...
-d digits
specifies the number of digits in the password either as number or as a range.

Long option: --digits=digits

-s specials
specifies the number of special characters, either as a number or as a range.

Long option: --specials=specials

-k upper
specifies the number of upper case characters, either as number or as a range.

Long option: --upper-case=upper

-p

print password only, skip the name.

Long options: --password-only or --password-only=off
-a prngs
lists the allowed PRNGs (pseudo random number generators). Use either ''all'' or one or multiple (comma-separated) from ''openssl'', ''random'', ''rand48'' or ''rand''.
-c option
saves the specified options as permanent options.

Long option: --configure

-C

shows the current configuration.

Long option: --show-configuration
-r

skips the permanent options for this one program invokation.

Long option: --reset
-u

removes the permanent options.

Long option: --unconfigure
-h

prints a short help text.

Long option: --help
-v

prints version information.

Long option: --version

Return Value

On success the program writes a password suggestion for each specified user name to standard output and returns exit code 0. Positive numbers are returned on errors.

Examples

createp -c -t admin -l 8-10 -d 2-4 -s 1-2 -k 1-2
creates a new password type ''admin'' using a password length in the range 8...10, 2...4 digits in the password, 1...2 special characters and 1...2 upper case characters. This password type is now the default password type.
createp -c -t user -l6 -d2 -s0 -k0
creates a new password type ''user'' using a fixed password length of 6, passwords contain 2 digits, no special characters and no upper case characters. The ''user'' password type is now the default password type.
createp peter paul mary
prints password suggestsion for the users peter, paul and mary.
createp -t admin root
suggests a more complicated password for a user named root.
createp -c -t wpa-key-1 -l 32 -p -o hex
creates a new password type for WPA keys.
createp -c -t wpa-key-2 -p -l 64 -o ascii85
creates a new password type for WPA keys consisting of 64 characters in the range 0x21...0x7F.
createp -t wpa-key-1 my-computer
prints a possible WPA key.

Security

In dktools-1.2.24 and above createp can use the OpenSSL PRNG . This PRNG must be seeded before it can be used. Seed data can be obtained from the following sources:

a seed file.
This file can be specified in the /openssl/random-seed-file preference. If this preference is not defined, the default file name $HOME/.rnd is used. The seed file must be secured, only the owner must have read/write access to this file. If access to this file is enabled for group/others the seed file is not used.

A system preference /openssl/allow-random-seed-file=no can be used to deny the use of seed files (i.e. for users having home directories on NFS file systems).

an EGD socket
The socket name is obtained from the /openssl/egd-socket preference or the EGDSOCKET environment variable. If none of these is set, the default file name /var/run/egd-pool is used.
the /dev/urandom and/or /dev/random device
the screen contents (on Windows systems).

Restrictions

The program uses PRNGs which must be seeded. If none of the allowed PRNGs can be seeded, the program fails to run.

See Also

http://dktools.sourceforge.net/createp.html

Author

Dirk Krause

Copyright And License

Copyright © 2001-2008, Dirk Krause All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above
  copyright notice, this list of conditions and the
  following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the following
  disclaimer in the documentation and/or other materials
  provided with the distribution.

* Neither the name of the Dirk Krause nor the names of
  contributors may be used to endorse or promote products
  derived from this software without specific prior written
  permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .

Last Modification

2008/04/04