LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-10-2009, 05:05 PM   #1
clau_bolson
Member
 
Registered: Nov 2003
Location: Argentina
Distribution: Debian Sarge
Posts: 52

Rep: Reputation: 15
Export from mysql to ldap - encrypted passwords


Hi,
I am setting up a new mail server.
I have a working mail server using mysql, our advisor told us that ldap would be a better choice for the new server, so it's all set up and working now.
I have to export the accounts. I will make a php script that will read from mysql and record to ldap - easy.
But I don't know how to convert passwords. For the accounts I have created so far in ldap server, I used slappasswd and copied the resulting string. I've chosen {CRYPT}. Dovecot has no trouble reading them.
In mysql passwords were generated using its encrypt() function.
I guess, if I copy them straight, it won't work.

What should I do?

Thanks.
 
Old 06-11-2009, 01:45 PM   #2
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Quote:
Originally Posted by clau_bolson View Post
Hi,
I am setting up a new mail server.
I have a working mail server using mysql, our advisor told us that ldap would be a better choice for the new server, so it's all set up and working now.
I have to export the accounts. I will make a php script that will read from mysql and record to ldap - easy.
But I don't know how to convert passwords. For the accounts I have created so far in ldap server, I used slappasswd and copied the resulting string. I've chosen {CRYPT}. Dovecot has no trouble reading them.
In mysql passwords were generated using its encrypt() function.
I guess, if I copy them straight, it won't work.

What should I do?

Thanks.
You've got passwords that have already been encrypted using this function:

http://dev.mysql.com/doc/refman/5.1/...nction_encrypt

And you're trying to store them in LDAP as CRYPT passwords, right?

http://www.openldap.org/faq/data/cache/344.html


This should work, but I'm a little confused. Can you please clarify more info about your dovecot + SQL / LDAP setup(s)?

When you say "I used slappasswd and copied the resulting string. I've chosen {CRYPT}. Dovecot has no trouble reading them." ... Dovecot shouldn't be reading the passwords out of the LDAP directory. It should be passing authentication attempt through to it.

- Arch
 
  


Reply

Tags
ldap, mysql, passwords


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Qmail - Encrypted Passwords chrisfirestar Linux - Networking 9 06-25-2013 02:11 AM
Sync MySQL passwords with local account passwords? turbine216 Linux - Software 2 02-18-2005 03:15 AM
Completely uninstalling MySQL and its passwords passwords...how? I locked myself out! Baix Linux - Newbie 2 01-30-2005 04:10 PM
Encrypted Passwords, how could I tell? wardialer Linux - Security 13 10-12-2004 02:14 PM
creating encrypted passwords kidwired Linux - Security 3 01-12-2003 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration