Mkpasswd

  • Mkpasswd(1) - Linux man page Name mkpasswd - generate new password, optionally apply it to a user Synopsis mkpasswd args user Introduction mkpasswd generates passwords and can apply them automatically to users. Mkpasswd is based on the code from Chapter 23 of the O'Reilly book 'Exploring Expect'.
  • Hi, in Fedora 28 I used the command `mkpasswd` 1 to generate passwords according to different criteria. Now in Fedora 30 this command asks for a password to encrypt for /etc/passwd.
  • MKPASSWDOPTIONS 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(1), passwd(5), crypt(3), getpass(3) AUTHOR¶.
  • The mkpasswd command is overfeatured front end to crypt function. Makepasswd command generates true random passwords by using the /dev/random feature of Linux, with the emphasis on security over pronounceability. It can also encrypt plaintext passwords given on the command line. The updated version of generate new password, optionally apply it.
MkpasswdInstallOnline

I was surprised to find the mkpasswd utility missing from my new installation of CentOS 6.4.

For openSUSE Leap system, use Zypper Command to install mkpasswd. $ sudo zypper install expect. Run the mkpasswd command in terminal to generate a random password. $ mkpasswd 37slQepD. Run the mkpasswd command with the following format to generate a random strong password with 14 characters.

Ubuntu

Mkpasswd Linux

Mkpasswd

Yum has a feature called whatprovides, which can be used to find out which installable package provides some feature, utility or file. The below demonstrates its use. You just need to prefix ‘*/’ to the utility name that your searching for.

The output shows us that the expect package contains the mkpasswd utility.

Mkpasswd Centos

Now I can quickly and easily generate strong passwords from the Linux command line. For example, the following command produces a password using the default set of arguments.

Mkpasswd Ubuntu

A default password is 9 characters long. Each password will have at least 2 digits (numbers); 2 upper and 2 lowercase alphabetic characters; plus 1 special character, which in our example is an asterisk (‘*‘).