LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 06-10-2009, 06:05 PM   #1
clau_bolson
Member
 
Registered: Nov 2003
Location: Argentina
Distribution: Debian Sarge
Posts: 51
Thanked: 0
Export from mysql to ldap - encrypted passwords


[Log in to get rid of this advertisement]
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.
clau_bolson is offline  
Tag This Post , ,
Reply With Quote
Old 06-11-2009, 02:45 PM   #2
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Kubuntu, RHEL/CentOS
Posts: 215
Thanked: 20
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
archangel_617b is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Sync MySQL passwords with local account passwords? turbine216 Linux - Software 2 02-18-2005 04:15 AM
Completely uninstalling MySQL and its passwords passwords...how? I locked myself out! Baix Linux - Newbie 2 01-30-2005 05:10 PM
Qmail - Encrypted Passwords chrisfirestar Linux - Networking 8 01-23-2005 08:13 PM
Encrypted Passwords, how could I tell? wardialer Linux - Security 13 10-12-2004 03:14 PM
creating encrypted passwords kidwired Linux - Security 3 01-12-2003 05:34 PM


All times are GMT -5. The time now is 12:43 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration