Linux Commands Examples

A great documentation place for Linux commands

mkpasswd

Overfeatured front end to crypt(3)


see also : passwd

Synopsis

mkpasswd PASSWORD SALT


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
for i in {1..20}
do
mkpasswd -l 10 -2 -s 0
done

description

mkpasswd encrypts the given password with the crypt(3) libc function using the given salt.

options

-S, --salt=STRING

Use the STRING as salt. It must not contain prefixes such as $1$.

-R, --rounds=NUMBER

Use NUMBER rounds. This argument is ignored if the method chosen does not support variable rounds. For the OpenBSD Blowfish method this is the logarithm of the number of rounds.

-m, --method=TYPE

Compute the password using the TYPE method. If TYPE is help then the available methods are printed.

-5

Like --method=md5.

-P, --password-fd=NUM

Read the password from file descriptor NUM instead of using getpass(3). If the file descriptor is not connected to a tty then no other message than the hashed password is printed on stdout.

-s, --stdin

Like --password-fd=0.

environment

MKPASSWD_OPTIONS

A list of options which will be evalued before the ones specified on the command line.


bugs

If the --stdin option is used, passwords containing some control characters may not be read correctly.
This programs suffers of a bad case of featuritis.


see also

passwd , passwd, crypt, getpass


author

mkpasswd and this man page were written by Marco d’Itri <md[:at:]linux[:dot:]it> and are licensed under the terms of the GNU General Public License, version 2 or higher.

How can this site be more helpful to YOU ?


give  feedback