Mkpasswd

The package also contains mkpasswd, a features-rich front end to the password encryption function crypt(3). Expect Automates interactive applications. Expect is a tool for automating interactive applications according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. A simple tool for generating random passwords suitable for Oracle (e.g. Not starting with a number). Requires package monads-fd and random-shuffle from Cabal. Use./build.sh to build, then./mkpasswd. The defaults (run with no args) should be suitable for everyday use. $./mkpasswd -help mkpasswd -l NUMBER -length=NUMBER Length in chars -d. I just looked at the PKGBUILD and Makefile and saw that it only installs 'mkpasswd'. My apologies for wrongly filing it as outdated. I had the impression that something might be fishy with the package when I. A very interesting tool that is part of the Expect RPM is 'mkpasswd'. It is a little Tcl script that uses Expect to work with the passwd program to generate a random password and set it immediately. A somewhat adjusted version of 'mkpasswd' can be downloaded here. The adjusted version of mkpasswd will generate a random password for a user, with.

  1. Mkpasswd Package
  2. Mkpasswd Linux
  3. Mkpasswd Online

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

Mkpasswd

Mkpasswd is based on the code from Chapter 23 of the O'Reilly book 'Exploring Expect'. USAGE With no arguments, mkpasswd returns a new password. Mkpasswd With a user name, mkpasswd assigns a new password to the user. Mkpasswd don The passwords are randomly generated according to.

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.

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.

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 (‘*‘).

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 isbased on the code from Chapter 23 of the O'Reilly book 'Exploring Expect'.

Usage

MkpasswdWith no arguments, mkpasswd returns a new password.

mkpasswd

With a user name, mkpasswd assigns a new password to the user.

mkpasswd don

The passwords are randomly generated according to the flags below.

Flags

The

Mkpasswd Package

-l flag defines the length of the password. The default is 9. The following examplecreates a 20 character password.

Mkpasswd Linux

mkpasswd -l 20

The -d flag defines the minimum number of digits that must be in the password. The default is 2. The following example creates a password with atleast 3 digits.

Mkpasswd Online

mkpasswd -d 3

The -c flag defines the minimum number of lowercase alphabetic characters that must be in the password. The default is 2.

The -C flag defines the minimum number of uppercase alphabetic characters that must be in the password. The default is 2.

The -s flag defines the minimum number of special characters that must be in the password. The default is 1.

The -p flag names a program to set the password. By default, /etc/yppasswd is used if present, otherwise /bin/passwd is used.

The -2 flag causes characters to be chosen so that they alternate between right and left hands (qwerty-style), making it harder for anyone watchingpasswords being entered. This can also make it easier for a password-guessing program.

The -v flag causes the password-setting interaction to be visible. By default, it is suppressed.

Example

The following example creates a 15-character password that contains at least 3 digits and 5uppercase characters.

mkpasswd -l 15 -d 3 -C 5

See Also

'Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs' by Don Libes, O'Reillyand Associates, January 1995.

Author

Don Libes, National Institute of Standards and TechnologyMkpasswd

mkpasswd is in the public domain. NIST and I would appreciate credit if this program or parts of it are used.