Hi Pablo:
You need to base-64 encode the string "{MD5}HASHED-PASSWORD" where
HASHED-PASSWORD is the base-64 encoding of the binary MD5 hashed
version. For example, in Python:
import hashlib, base64
password = 'secret-passw0rd'
md5 = hashlib.md5()
md5.update(password)
s = '{MD5}' + base64.b64encode(md5.digest())
print base64.b64encode(s)
prints:
e01ENX1JNE9IbEhwdmZMMVlmeWx1L1A5dFh3PT0=
which you can then put in the "userPassword::" entry in your LDIF file.
Take care,
Sean.
"Fuentes Bodión" <mailto:%22Fuentes+Bodi%F3n%22>
2017-07-24 at 10.52 a
Hi,
We are trying to generate ldif files to load some user data and password.
If I take the ldif generated from apache directory server M23 it works
fine and I can import and test the password, for example:
dn: uid=userExample3,ou=users,ou=applications,dc=transfesa,dc=com
objectClass: top
objectClass: inetOrgPerson
objectClass: person
objectClass: organizationalPerson
cn: test AMOB user 3
sn: Admin
employeeType: freighture_user
mail: [email protected]
uid: userExample3
userPassword:: e01ENX1OSUdkZSs2cnVTWUtYSVZMeUZzK1JBPT0=
the password is: mypassword and it works fine in Apache Directory Studio.
from e01ENX1OSUdkZSs2cnVTWUtYSVZMeUZzK1JBPT0= I can decode to
{MD5}NIGde+6ruSYKXIVLyFs+RA==
now trying to do in reverse order, so I can generate MD5 + encode
that can be used in ldif.
Using some public tools I can generate hexadecimal form password, for
example:
http://7thspace.com/webmaster_tools/online_md5_encoder.html
Mypassword à34819d7beeabb9260a5c854bc85b3e44
But How I can generate an ldif password that can be used in export …
using online tools the format is hexadecimal and importing this in
apache ldif does not work / password not accepted.
Please can you let me know how to generate a password that can be
placed in ldif so user can authenticate with this password.
How I can change from 34819d7beeabb9260a5c854bc85b3e44 ( hexadecimal
??) to {MD5}NIGde+6ruSYKXIVLyFs+RA==
Any ideas welcome!
Thanks in advance, Pablo.
*Pablo Fuentes*
Middleware Administrator
Infrastructure-DSI
cid:[email protected]
Calle Musgo 1 (Urb. La Florida)
28023 - Madrid - ESPAÑA
Teléfono: (+34) 913.879.900 (Centralita)
Ext 1262
email: [email protected] <mailto:[email protected]>