O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

makekey

Synopsis

makekey

Produces crypt password hashes. This can be used to automatically populate a password database from known passwords, or to make hashes of prospective passwords that can be subjected to cracking attempts before being put into use.

Options/usage

makekey takes no command-line arguments. It accepts a character string on standard input, consisting of an eight-character password combined with a two-character salt, which is used to permute the DES password encryption algorithm. (Use man crypt for more information.) It prints a 13-character string to standard output, with the first two characters being the salt, and the other eleven characters being the password hash. The entire string is suitable for use as the password field in a standard Unix /etc/passwd-format file or as the value of the passwd property in an Open Directory entry for a user employing Basic authentication.

Example

$ echo password12 | /usr/libexec/makekey
12CsGd8FRcMSM

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required