Thread: PASSWORD() function for postgresql?
I am looking for a postgresql PASSWORD() function that
produces hashes compatible with MySQL's implementation.
I am converting from MySQL and I know of no other way to
use the passwords I have in the old database other than
having a compatible PASSWORD() function.
I have searched around for one quite a bit but could not find
one. Does anyone know if someone has written something
to do this already? If so, where I can get it from?
I am off the list so please include me in CC, etc.
Thanks in advance,
Jason DiCioccio
You could take the password hashing routine out of client/password.c (in the mysql source) and write your own C function... I know just enough C to think that it shouldn't be that hard, but not enough to do it :) -philip On Sun, 15 Jul 2001, Jason DiCioccio wrote: > I am looking for a postgresql PASSWORD() function that > produces hashes compatible with MySQL's implementation. > > I am converting from MySQL and I know of no other way to > use the passwords I have in the old database other than > having a compatible PASSWORD() function. > > I have searched around for one quite a bit but could not find > one. Does anyone know if someone has written something > to do this already? If so, where I can get it from? > > I am off the list so please include me in CC, etc. > > Thanks in advance, > Jason DiCioccio > >
For that matter, you could write a perl function using perl's built-in crypt() function. I'm not sure if it's exactly identical to what mysql does, though I strongly suspect that it is. Philip Hallstrom <philip%adhesivemedia.com@interlock.lexmark.com> on 07/23/2001 02:13:27 PM To: Jason DiCioccio <geniusj%bluenugget.net@interlock.lexmark.com> cc: pgsql-general%postgresql.org@interlock.lexmark.com (bcc: Wesley Sheldahl/Lex/Lexmark) Subject: [GENERAL] Re: PASSWORD() function for postgresql? You could take the password hashing routine out of client/password.c (in the mysql source) and write your own C function... I know just enough C to think that it shouldn't be that hard, but not enough to do it :) -philip On Sun, 15 Jul 2001, Jason DiCioccio wrote: > I am looking for a postgresql PASSWORD() function that > produces hashes compatible with MySQL's implementation. > > I am converting from MySQL and I know of no other way to > use the passwords I have in the old database other than > having a compatible PASSWORD() function. > > I have searched around for one quite a bit but could not find > one. Does anyone know if someone has written something > to do this already? If so, where I can get it from? > > I am off the list so please include me in CC, etc. > > Thanks in advance, > Jason DiCioccio > > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html