PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > import a md5 hash to openldap userpassword
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

import a md5 hash to openldap userpassword

Réponse
 
LinkBack Outils de la discussion
Vieux 17/06/2007, 00h10   #1
Martin Marcher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut import a md5 hash to openldap userpassword

Hello,

this will probably land on some ldap ldap list but maybe someone knows offhand:

i have a couple of users in a database with the passwords stored as md5 hashes

something like

"alice" "3858f62230ac3c915f300c664312c63f" (foobar in plaintext)

Now i want to import alice into ldap

dn: uid=alice,dc=example,dc=com
objectClass: simpleSecurityObject
userpassword: {MD5}3858f62230ac3c915f300c664312c63f

which doesn't really work. I found serveral that suggested using a
base64 encoded string

so I tried:

userpassword:: Mzg1OGY2MjIzMGFjM2M5MTVmMzAwYzY2NDMxMmM2M2Y=
userpassword: {MD5}Mzg1OGY2MjIzMGFjM2M5MTVmMzAwYzY2NDMxMmM2M2Y=

all to no avail.

any hints on the right format (I don't have the plaintext passwords
and I'd prefer not to spend time with brute forcing them)

thanks
martin


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 17/06/2007, 02h30   #2
Roberto C. Sánchez
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: import a md5 hash to openldap userpassword

On Sun, Jun 17, 2007 at 01:03:30AM +0200, Martin Marcher wrote:
> Hello,
>
> this will probably land on some ldap ldap list but maybe someone knows
> offhand:
>
> i have a couple of users in a database with the passwords stored as md5
> hashes
>
> something like
>
> "alice" "3858f62230ac3c915f300c664312c63f" (foobar in plaintext)
>
> Now i want to import alice into ldap
>
> dn: uid=alice,dc=example,dc=com
> objectClass: simpleSecurityObject
> userpassword: {MD5}3858f62230ac3c915f300c664312c63f
>
> which doesn't really work. I found serveral that suggested using a
> base64 encoded string
>

IIRC, the MD5 format used by ldap, login and so on, is not the same as a
vanilla md5 hash. That is, the password uses a salt and a modified md5
algorithm. Without having the plaintext passwords, I am not sure how
you can convert one to the other.

As a side note, if you are using this ldap for login authentication, you
want to make sure that your clients are configured to use 'pam_password
exop' so that the password hashing gets handled on the server. Of
course, this means that you want an SSL link to your ldap server.

Regards,

-Roberto

--
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGdIy91snWssAFC08RAlQZAJkB+9Xex469Y+xobJg7TD 1KNYo6wgCgmOqw
ee6Bk6X4kA0vb5MQ0BxrZYY=
=NC5H
-----END PGP SIGNATURE-----

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h12.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09988 seconds with 10 queries