(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Configuration : (Category) SLAPD Configuration : (Category) Passwords : (Answer) What are {MD5} and {SMD5} passwords and how do I generate them?
OpenLDAP supports RFC 2307 passwords, including the {MD5}, {SMD5} and other schemes. Such passwords may be used as userPassword values and/or rootpw value. See (Xref) What are RFC 2307 hashed user passwords?.
Use of {SSHA} passwords is recommended over MD5 varients.
#! /usr/bin/perl
#
# This small script generates an Seeded MD5 hash of 'secret'
# (using the seed "salt") for use as a userPassword or rootpw value.
#
use Digest::MD5;
use MIME::Base64;
$ctx = Digest::MD5->new;
$ctx->add('secret');
$salt = 'salt';
$ctx->add($salt);
$hashedPasswd = '{SMD5}' . encode_base64($ctx->digest . $salt ,'');
print 'userPassword: ' .  $hashedPasswd . "\n";
#! /usr/bin/perl
#
# This small script generates an MD5 hash of 'secret' for use
# as a userPassword or rootpw value.
#
use Digest::MD5;
use MIME::Base64;
$ctx = Digest::MD5->new;
$ctx->add('secret');
$hashedPasswd = '{MD5}' . encode_base64($ctx->digest,'');
print 'userPassword: ' .  $hashedPasswd . "\n";
[Append to This Answer]
Previous: (Answer) What are {SHA} and {SSHA} passwords and how do I generate them?
Next: (Answer) What are {CRYPT} passwords and how do I generate them?
This document is: http://www.openldap.org/faq/index.cgi?file=418
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org