Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

md5crypt(n) [mojave man page]

md5crypt(n)						   MD5-based password encryption					       md5crypt(n)

__________________________________________________________________________________________________________________________________________________

NAME
md5crypt - MD5-based password encryption SYNOPSIS
package require Tcl 8.2 package require md5 2.0 package require md5crypt ?1.1.0? ::md5crypt::md5crypt password salt ::md5crypt::aprcrypt password salt ::md5crypt::salt ?length? _________________________________________________________________ DESCRIPTION
This package provides an implementation of the MD5-crypt password encryption algorithm as pioneered by FreeBSD and currently in use as a replacement for the unix crypt(3) function in many modern systems. An implementation of the closely related Apache MD5-crypt is also avail- able. The output of these commands are compatible with the BSD and OpenSSL implementation of md5crypt and the Apache 2 htpasswd program. COMMANDS
::md5crypt::md5crypt password salt Generate a BSD compatible md5-encoded password hash from the plaintext password and a random salt (see SALT). ::md5crypt::aprcrypt password salt Generate an Apache compatible md5-encoded password hash from the plaintext password and a random salt (see SALT). ::md5crypt::salt ?length? Generate a random salt string suitable for use with the md5crypt and aprcrypt commands. SALT
The salt passed to either of the encryption schemes implemented here is checked to see if it begins with the encryption scheme magic string (either "$1$" for MD5-crypt or "$apr1$" for Apache crypt). If so, this is removed. The remaining characters up to the next $ and up to a maximum of 8 characters are then used as the salt. The salt text should probably be restricted the set of ASCII alphanumeric characters plus "./" (dot and forward-slash) - this is to preserve maximum compatability with the unix password file format. If a password is being generated rather than checked from a password file then the salt command may be used to generate a random salt. EXAMPLES
% md5crypt::md5crypt password 01234567 $1$01234567$b5lh2mHyD2PdJjFfALlEz1 % md5crypt::aprcrypt password 01234567 $apr1$01234567$IXBaQywhAhc0d75ZbaSDp/ % md5crypt::md5crypt password [md5crypt::salt] $1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category md5crypt of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
md5 KEYWORDS
hashing, md5, md5crypt, message-digest, security CATEGORY
Hashes, checksums, and encryption COPYRIGHT
Copyright (c) 2003, Pat Thoyts <patthoyts@users.sourceforge.net> md5crypt 1.1.0 md5crypt(n)

Check Out this Related Man Page

crypt.conf(4)                                                      File Formats                                                      crypt.conf(4)

NAME
crypt.conf - configuration file for pluggable crypt modules SYNOPSIS
/etc/security/crypt.conf DESCRIPTION
crypt.conf is the configuration file for the pluggable crypt architecture. Each crypt module must provide a function to generate a pass- word hash, crypt_genhash_impl(3C), and a function to generate the salt, crypt_gensalt_impl(3C). There must be at least one entry in crypt.conf with the same name as is stored in the crypt_algorithm_magic symbol of the module. The docu- mentation provided with the module should list this name. The module_path field specifies the path name to a shared library object that implements crypt_genhash_impl(), crypt_gensalt_impl(), and crypt_algorithm_magic. If the path name is not absolute, it is assumed to be relative to /usr/lib/security/$ISA. If the path name con- tains the $ISA token, the token is replaced by an implementation-defined directory name that defines the path relative to the calling pro- gram's instruction set architecture. The params field is used to pass module-specific options to the shared objects. See crypt_genhash_impl(3C) and crypt_gensalt_impl(3C). It is the responsibility of the module to parse and interpret the options. The params field can be used by the modules to turn on debugging or to pass any module-specific parameters that control the output of the hashing algorithm. EXAMPLES
Example 1: Provide compatibility for md5crypt-generated passwords. The default configuration preserves previous Solaris behavior while adding compatibility for md5crypt-generated passwords as provided on some BSD and Linux systems. # # crypt.conf # 1 /usr/lib/security/$ISA/crypt_bsdmd5.so Example 2: Use md5crypt to demonstrate compatibility with BSD- and Linux-based systems. The following example lists 4 algorithms and demonstrates how compatibility with BSD- and Linux-based systems using md5crypt is made avail- able, using the algorithm names 1 and 2. # # crypt.conf # md5 /usr/lib/security/$ISA/crypt_md5.so rot13 /usr/lib/security/$ISA/crypt_rot13.so # For *BSD/Linux compatibilty # 1 is md5, 2 is Blowfish 1 /usr/lib/security/$ISA/crypt_bsdmd5.so 2 /usr/lib/security/$ISA/crypt_bsdbf.so ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
passwd(1), crypt(3C), crypt_genhash_impl(3C), crypt_gensalt(3C), crypt_gensalt_impl(3C), getpassphrase(3C), passwd(4), attributes(5), crypt_unix(5) SunOS 5.10 10 Jun 2002 crypt.conf(4)
Man Page