From eflores767003@yahoo.com.mx Thu Mar 1 06:37:58 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4B3559FB38F for ; Thu, 1 Mar 2007 02:37:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 52989-06 for ; Thu, 1 Mar 2007 02:37:28 -0400 (AST) X-Greylist: delayed 00:06:39.256431 by SQLgrey-1.7.4 Received: from web55615.mail.re4.yahoo.com (web55615.mail.re4.yahoo.com [206.190.58.239]) by postgresql.org (Postfix) with SMTP id DF8399FB37B for ; Thu, 1 Mar 2007 02:37:51 -0400 (AST) Received: (qmail 75095 invoked by uid 60001); 1 Mar 2007 06:31:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.mx; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=Zt5QhHiKUzXuQRbByFJWSFXstt0GZxmW3AGtMgmtyxWijJq3KOKTGdn0wWQWM5AbIGGYr0ks3vqitQchKnhylOgDF9aQozTJA8rEFcMxi3ZihOwhpu2orOwwKpkJJNYRkH1nUUpMpHUUY1KwG7oZwJdl6F8VJ7xCOIWuXN82zWE=; X-YMail-OSG: byJSN2EVM1k.v3JCPc4QLzcl2h.LdIiUHgxn8G89Rsj3VBIOCeoYAPtuHFo6hOeZFIw7FfhbtRF5EB8SiHMWw0nUY9KDE3ICbMspTdBGgokvS_Fbx6mTZPYhnaZSQTvh6p9ruA1lX58jWYo- Received: from [165.98.140.116] by web55615.mail.re4.yahoo.com via HTTP; Wed, 28 Feb 2007 22:31:11 PST X-Mailer: YahooMailRC/368.8 YahooMailWebService/0.6.132.8 Date: Wed, 28 Feb 2007 22:31:11 -0800 (PST) From: Eugenio Flores Subject: How to store a password encripted in a user defined table To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1507865513-1172730671=:74925" Message-ID: <629179.74925.qm@web55615.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200703/1 X-Sequence-Number: 27639 --0-1507865513-1172730671=:74925 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I wonder if somebody knows how to store passwords in a column that i= s part of a user defined table.=0A =0AI've been searching and reading the d= ocumentation, but I can't find what I'm looking for. I just get password su= bjects related to client's connections to the database.=0A =0AThanks in adv= anced for any help you can provide.=0A=0A=0A=09=0A=09=0A=09=09=0A__________= _________________________________________________ =0ADo You Yahoo!? =0ALa m= ejor conexi=F3n a Internet y 2GB extra a tu correo por $100 al mes.= http://net.yahoo.com.mx =0A --0-1507865513-1172730671=:74925 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
=0A

= Hello, I wonder if somebody knows = how to store passwords in a column that is part of a user defined table.

=0A

 

=0A=

I've been searching and reading the documentation, but I c= an't find what I'm looking for. I just get password subjects related to cli= ent's connections to the database.

=0A

 

=0A

Thanks in advanced for any= help you can provide.

=0A
 

=0A=09=09
=0ADo You Yahoo!? =0ALa mejor conexi=F3n a Int= ernet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx =0A --0-1507865513-1172730671=:74925-- From andrej.groups@gmail.com Thu Mar 1 08:21:11 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5E06F9FB37B for ; Thu, 1 Mar 2007 04:21:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 47227-01 for ; Thu, 1 Mar 2007 04:21:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230]) by postgresql.org (Postfix) with ESMTP id 006C79FB350 for ; Thu, 1 Mar 2007 04:21:07 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so375464wxd for ; Thu, 01 Mar 2007 00:21:07 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=s5lWHfPhOWCOHq2639XqoxgJM/cHKb3VMEvQVBV3RkgzN1/gSPDrazEwUAVx9cQ+A/aqlLf9FyICPvdoTPEJapsTkUaYpII3ZbG93VAS9DwxPeOOsGgCa7+FBo3BpqOoVpC6++yyosSDkb9c9bIPEWXAJlo5oUJkgADb9lG/zcw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZNEdR45WwlJm8iNNgEtUZFlpQt4D+XdiVdJOWDWUyECTcTL1fd+lsCGGofXPx0EtuyZ60pap1k9n+obj3PWoTZS5FvYrTGJyDfTT3/TO+Si11yOySPqBnfrSxMDq/Po/OeL6UmUkacLbXs9rEmXdeiqEb4FmB0fxnhMJ64WQCmk= Received: by 10.90.55.19 with SMTP id d19mr1427768aga.1172737266956; Thu, 01 Mar 2007 00:21:06 -0800 (PST) Received: by 10.90.119.2 with HTTP; Thu, 1 Mar 2007 00:21:06 -0800 (PST) Message-ID: Date: Thu, 1 Mar 2007 21:21:06 +1300 From: "Andrej Ricnik-Bay" To: "Eugenio Flores" , PostgreSQL Subject: Re: How to store a password encripted in a user defined table In-Reply-To: <629179.74925.qm@web55615.mail.re4.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <629179.74925.qm@web55615.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/3 X-Sequence-Number: 27641 On 3/1/07, Eugenio Flores wrote: > Hello, I wonder if somebody knows how to store passwords in a > column that is part of a user defined table. Assuming that your passwords are application specific use a sha1 or md5 algorithm (depending on how sensitive your data is) and store that in a varchar or char field. When the user authenticates the password gets hashed in the app and compared against the stored hash. Cheers, Andrej From eflores767003@yahoo.com.mx Thu Mar 1 11:06:29 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 20FD09FB774 for ; Thu, 1 Mar 2007 07:06:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 94138-08 for ; Thu, 1 Mar 2007 07:05:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from web55615.mail.re4.yahoo.com (web55615.mail.re4.yahoo.com [206.190.58.239]) by postgresql.org (Postfix) with SMTP id D67219FB718 for ; Thu, 1 Mar 2007 07:06:23 -0400 (AST) Received: (qmail 67217 invoked by uid 60001); 1 Mar 2007 11:06:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.mx; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=MRhUenOuvYL6c0BLa55FuEOkDz+PsVeeOOj0V/CCphYY8UzaxyWAv9c+fKcOMOwNtD4dNHXMJBZKEJc3/jVyIvlb4IO+tJglaFkdXTIanhrAupwPXHqdHFhzeOrcCuO9ROt2ih/58V7g/JxsmETrYvsPsjjbGdpMGHqoRnwMUg4=; X-YMail-OSG: xdz7L3YVM1ntuCGS6aumcFlMFmzagYwM_pCqPyBkBcsvn9QgsuTETg6lZ2qSdQ.IzMOxg9NcvBwxPMAm.2gIqqenNcMTrFoHCSPVAkc0IfqrBhwIl8kuS9vVzfpyyyg61_2xg.thgjwfqpg- Received: from [165.98.140.116] by web55615.mail.re4.yahoo.com via HTTP; Thu, 01 Mar 2007 03:06:22 PST X-Mailer: YahooMailRC/368.8 YahooMailWebService/0.6.132.8 Date: Thu, 1 Mar 2007 03:06:22 -0800 (PST) From: Eugenio Flores Subject: Re: How to store a password encripted in a user defined table To: Andrej Ricnik-Bay , PostgreSQL MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2014517421-1172747182=:64473" Message-ID: <675205.64473.qm@web55615.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.3 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200703/4 X-Sequence-Number: 27642 --0-2014517421-1172747182=:64473 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Andrej. But how can I use such algoritms in postgresql? arey they de= fined in a function that I can call?=0A =0AOr, do I have to code one of tho= se algorithm to use it in my application?=0A=0A=0A----- Mensaje original --= --=0ADe: Andrej Ricnik-Bay =0APara: Eugenio Flores= ; PostgreSQL =0AEnvi= ado: jueves, 1 de marzo, 2007 0:21:06=0AAsunto: Re: [SQL] How to store a pa= ssword encripted in a user defined table=0A=0A=0AOn 3/1/07, Eugenio Flores = wrote:=0A> Hello, I wonder if somebody knows h= ow to store passwords in a=0A> column that is part of a user defined table.= =0AAssuming that your passwords are application specific use=0Aa sha1 or md= 5 algorithm (depending on how sensitive your data is)=0Aand store that in a= varchar or char field. When the user authenticates=0Athe password gets ha= shed in the app and compared against the=0Astored hash.=0A=0A=0ACheers,=0AA= ndrej=0A=0A---------------------------(end of broadcast)-------------------= --------=0ATIP 9: In versions below 8.0, the planner will ignore your desir= e to=0A choose an index scan if your joining column's datatypes do no= t=0A match=0A=0A=0A=09=0A=09=0A=09=09=0A_____________________________= ______________________________ =0ADo You Yahoo!? =0ALa mejor conexi=F3n a I= nternet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.c= om.mx =0A --0-2014517421-1172747182=:64473 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
=0A
Thanks Andrej. But how can I use suc= h algoritms in postgresql? arey they defined in a function that I can call?=
=0A
 
=0A
Or, do I have to code one of th= ose algorithm to use it in my application?

=0A
----- = Mensaje original ----
De: Andrej Ricnik-Bay <andrej.groups@gmail.com&= gt;
Para: Eugenio Flores <eflores767003@yahoo.com.mx>; PostgreSQL = <pgsql-sql@postgresql.org>
Enviado: jueves, 1 de marzo, 2007 0:21:= 06
Asunto: Re: [SQL] How to store a password encripted in a user defined= table

=0A
On 3/1/07, Eugenio Flores <eflores767003@yahoo.com= .mx> wrote:
> Hello, I wonder if somebody knows how to store passw= ords in a
> column that is part of a user defined table.
Assuming = that your passwords are application specific use
a sha1 or md5 algorithm= (depending on how sensitive your data is)
and store that in a varchar o= r char field.  When the user authenticates
the password gets h= ashed in the app and compared against the
stored hash.


Cheers= ,
Andrej

---------------------------(end of broadcast)-----------= ----------------
TIP 9: In versions below 8.0, the planner will ignore y= our desire to
       choose an index scan = if your joining column's datatypes do not
     =   match


=0A=09=09
=0ADo Y= ou Yahoo!? =0ALa mejor conexi=F3n a Internet y 2GB extra a tu correo= por $100 al mes. http://net.yahoo.com.= mx =0A --0-2014517421-1172747182=:64473-- From pgsql@Sheeky.Biz Thu Mar 1 11:39:49 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 53D029FB7CD for ; Thu, 1 Mar 2007 07:39:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 99323-10 for ; Thu, 1 Mar 2007 07:39:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by postgresql.org (Postfix) with ESMTP id 6CF729FB62C for ; Thu, 1 Mar 2007 07:39:45 -0400 (AST) Received: from ppp247-71.static.internode.on.net (HELO [192.168.8.200]) ([203.122.247.71]) by ipmail02.adl2.internode.on.net with ESMTP; 01 Mar 2007 22:09:43 +1030 X-IronPort-AV: i="4.14,234,1170595800"; d="scan'208"; a="91553915:sNHT26468792" Message-ID: <45E6BB7F.2070509@Sheeky.Biz> Date: Thu, 01 Mar 2007 22:09:43 +1030 From: Shane Ambler User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Andrej Ricnik-Bay CC: Eugenio Flores , PostgreSQL Subject: Re: How to store a password encripted in a user defined table References: <629179.74925.qm@web55615.mail.re4.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.005 tagged_above=0 required=5 tests=AWL, BAYES_50, BIZ_TLD, SPF_HELO_PASS X-Spam-Level: ** X-Archive-Number: 200703/6 X-Sequence-Number: 27644 Andrej Ricnik-Bay wrote: > On 3/1/07, Eugenio Flores wrote: >> Hello, I wonder if somebody knows how to store passwords in a >> column that is part of a user defined table. > Assuming that your passwords are application specific use > a sha1 or md5 algorithm (depending on how sensitive your data is) > and store that in a varchar or char field. When the user authenticates > the password gets hashed in the app and compared against the > stored hash. > If you want the server to take care of it look at pgcrypto - you will find it in the contrib folder of the source distro. This doesn't give you an encrypted data type (but you could set that up if you wish) it will give you functions that you can use. Of course that would mean they get sent through the client connection as clear text unless you are using an SSL client connection. -- Shane Ambler pgSQL@Sheeky.Biz Get Sheeky @ http://Sheeky.Biz From desoi@pgedit.com Thu Mar 1 13:25:37 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C53489FBCFC for ; Thu, 1 Mar 2007 09:25:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 83898-09 for ; Thu, 1 Mar 2007 09:25:34 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from a2s5.a2hosting.com (a2s5.a2hosting.com [209.124.50.10]) by postgresql.org (Postfix) with ESMTP id 9CEFF9FBC9A for ; Thu, 1 Mar 2007 09:25:34 -0400 (AST) Received: from adsl-155-107-212.tys.bellsouth.net ([72.155.107.212] helo=[192.168.1.12]) by a2s5.a2hosting.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1HMlHo-00015x-Oz; Thu, 01 Mar 2007 08:25:32 -0500 In-Reply-To: <675205.64473.qm@web55615.mail.re4.yahoo.com> References: <675205.64473.qm@web55615.mail.re4.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <95880380-1F04-44B5-9353-BAB84955748E@pgedit.com> Cc: Andrej Ricnik-Bay , PostgreSQL Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: How to store a password encripted in a user defined table Date: Thu, 1 Mar 2007 08:25:28 -0500 To: Eugenio Flores X-Mailer: Apple Mail (2.752.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s5.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/7 X-Sequence-Number: 27645 MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to hash passwords. For example: select md5('this is my password'); md5 ---------------------------------- 210d53992dff432ec1b1a9698af9da16 (1 row) On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > Thanks Andrej. But how can I use such algoritms in postgresql? arey > they defined in a function that I can call? > > Or, do I have to code one of those algorithm to use it in my > application? John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL From Bart.Degryse@indicator.be Thu Mar 1 13:42:58 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D9D679FBE0A for ; Thu, 1 Mar 2007 09:42:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 23986-02 for ; Thu, 1 Mar 2007 09:42:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id 580189FBE13 for ; Thu, 1 Mar 2007 09:42:54 -0400 (AST) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Thu, 01 Mar 2007 14:30:26 +0100 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Thu, 01 Mar 2007 14:42:51 +0100 Message-Id: <45E6E662.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Thu, 01 Mar 2007 14:42:43 +0100 From: "Bart Degryse" To: "John DeSoi" , "PostgreSQL" Subject: Re: How to store a password encripted in a user definedtable References: <675205.64473.qm@web55615.mail.re4.yahoo.com><95880380-1F04-44B5 -9353-BAB84955748E@pgedit.com> In-Reply-To: <95880380-1F04-44B5-9353-BAB84955748E@pgedit.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part5074FE43.1__=" X-imss-version: 2.046 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, HTML_MESSAGE, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200703/8 X-Sequence-Number: 27646 --=__Part5074FE43.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Maybe a little example - create a table with two columns: username and password (eg. tbl_users) - in a secure environment (thus not over the internet) insert records into = the table INSERT INTO tbl_users(username, password) VALUES ('John', md5('johnspassw= ord')) - make a website with a login page (=3D a form with two fields: frm_usernam= e and frm_password) - let a javascript md5 function hash the password before sending the form = field values to the webserver that way the password doensn't go over the internet in an unprotected = way - let your webserver (eg with php) compare the received password (=3D = hashed) with the one in tbl_users select count(*) from tbl_users where username =3D [value from frm_usernam= e] and password =3D [value from frm_password] if the password is ok then count will be 1 - the user has been authenticated and can go on now you can start a session in your website, etc etc if count was 0 you should resent the login form with a notice "wrong = password" >>> John DeSoi 2007-03-01 14:25 >>> MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to =20 hash passwords. For example: select md5('this is my password'); md5 ---------------------------------- 210d53992dff432ec1b1a9698af9da16 (1 row) On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > Thanks Andrej. But how can I use such algoritms in postgresql? arey =20 > they defined in a function that I can call? > > Or, do I have to code one of those algorithm to use it in my =20 > application? John DeSoi, Ph.D. http://pgedit.com/=20 Power Tools for PostgreSQL ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match --=__Part5074FE43.1__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Maybe a little example
- create a table with two columns: username and password (eg. = tbl_users)
- in a secure environment (thus not over the internet) insert records = into the table
  INSERT INTO tbl_users(username, password) VALUES ('John', = md5('johnspassword'))
- make a website with a login page (=3D a form with two fields: = frm_username and frm_password)
- let a javascript md5 function hash the password before sending the = form field values to the webserver
  that way the password doensn't go over the internet in an = unprotected way
- let your webserver (eg with php) compare the received password (=3D = hashed) with the one in tbl_users
  select count(*) from tbl_users where username =3D [value from = frm_username] and password =3D [value from frm_password]
  if the password is ok then count will be 1
- the user has = been authenticated and can go on
  now you can start a session in your website, etc etc
  = if count was 0 you should resent the login form with a notice "wrong = password"

>>> John DeSoi <desoi@pgedit.com> = 2007-03-01 14:25 >>>
MD5 is built-in to PostgreSQL. It is what = PostgreSQL itself uses to 
hash passwords. For example:

sel= ect md5('this is my password');

      =           md5
-------------= ---------------------
210d53992dff432ec1b1a9698af9da16
(1 row)


On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:

> = Thanks Andrej. But how can I use such algoritms in postgresql? arey  =
> they defined in a function that I can call?
>
> Or, = do I have to code one of those algorithm to use it in my 
> = application?



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


------= ---------------------(end of broadcast)---------------------------
TIP = 9: In versions below 8.0, the planner will ignore your desire to
 &= nbsp;     choose an index scan if your joining = column's datatypes do not
       = match
--=__Part5074FE43.1__=-- From ezequias.rocha@gmail.com Thu Mar 1 14:08:23 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 650FE9FBD2C for ; Thu, 1 Mar 2007 10:08:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 27943-01 for ; Thu, 1 Mar 2007 10:07:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 713669FB990 for ; Thu, 1 Mar 2007 10:08:19 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so336265ugf for ; Thu, 01 Mar 2007 06:08:18 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LaeSJhELOYgYiT4AuwNFAanc1p4n7HuPisMzyG6NDdacMogbbm/DBZXgtp4vgNLak9LcK4H0D8t5E1tR3r3IL/SS4Gmwbb2bJLHMPov1WjV8EI1Zb9JLOzi1POdHZUrvSVIos0DxKSJ+a0dQ8BKxYVhed75Uj2Smp6hDNnhRDhU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EDwc0NW4O4yCP0bvrxMq26kZJF6ZZtolcvCCUGeQ6Fb29Q78DZbhbdT1ybAAFF1/g1KFvbVj3TugYHT5ohpC+DoBh+HjVqWJxAWqxeVHrz05lOHg/I+VYUI4OdcVuxR51MdLZBezovnsS1sLX7A2LVLnlZoESyKbCe85SsroxVE= Received: by 10.67.117.18 with SMTP id u18mr2036305ugm.1172758097970; Thu, 01 Mar 2007 06:08:17 -0800 (PST) Received: by 10.67.94.13 with HTTP; Thu, 1 Mar 2007 06:08:17 -0800 (PST) Message-ID: <55c095e90703010608w55a44b6ifbec7fe8f9fb98dd@mail.gmail.com> Date: Thu, 1 Mar 2007 11:08:17 -0300 From: "Ezequias Rodrigues da Rocha" To: "John DeSoi" Subject: Re: How to store a password encripted in a user defined table Cc: "Eugenio Flores" , "Andrej Ricnik-Bay" , PostgreSQL In-Reply-To: <95880380-1F04-44B5-9353-BAB84955748E@pgedit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <95880380-1F04-44B5-9353-BAB84955748E@pgedit.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/9 X-Sequence-Number: 27647 John, That was what I was looking for for a long time. Now I will change my teller password account to md5. Could someone suggest me how to change all passwords (PLAIN) to md5 ? My real best regards Ezequias 2007/3/1, John DeSoi : > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > hash passwords. For example: > > select md5('this is my password'); > > md5 > ---------------------------------- > 210d53992dff432ec1b1a9698af9da16 > (1 row) > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey > > they defined in a function that I can call? > > > > Or, do I have to code one of those algorithm to use it in my > > application? > > > > John DeSoi, Ph.D. > http://pgedit.com/ > Power Tools for PostgreSQL > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ From Bart.Degryse@indicator.be Thu Mar 1 14:45:06 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A53329FBD20 for ; Thu, 1 Mar 2007 10:45:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 31548-09 for ; Thu, 1 Mar 2007 10:44:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id A0BC09FBC9F for ; Thu, 1 Mar 2007 10:44:57 -0400 (AST) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Thu, 01 Mar 2007 15:32:30 +0100 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Thu, 01 Mar 2007 15:44:54 +0100 Message-Id: <45E6F4ED.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Thu, 01 Mar 2007 15:44:46 +0100 From: "Bart Degryse" To: "PostgreSQL" Subject: Re: How to store a password encripted in a user definedtable References: <675205.64473.qm@web55615.mail.re4.yahoo.com><95880380-1F04-44B5 -9353-BAB84955748E@pgedit.com><55c095e90703010608w55a44b6ifbec7fe8f9fb98dd@ mail.gmail.com> In-Reply-To: <55c095e90703010608w55a44b6ifbec7fe8f9fb98dd@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartE3C74DCE.2__=" X-imss-version: 2.046 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.421 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, HTML_40_50, HTML_MESSAGE, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200703/10 X-Sequence-Number: 27648 --=__PartE3C74DCE.2__= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit update yourtable set passwordfield = md5(passwordfield) watch out: md5 is irreversable! you can't "un_md5" >>> "Ezequias Rodrigues da Rocha" 2007-03-01 15:08 >>> John, That was what I was looking for for a long time. Now I will change my teller password account to md5. Could someone suggest me how to change all passwords (PLAIN) to md5 ? My real best regards Ezequias 2007/3/1, John DeSoi : > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > hash passwords. For example: > > select md5('this is my password'); > > md5 > ---------------------------------- > 210d53992dff432ec1b1a9698af9da16 > (1 row) > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey > > they defined in a function that I can call? > > > > Or, do I have to code one of those algorithm to use it in my > > application? > > > > John DeSoi, Ph.D. > http://pgedit.com/ > Power Tools for PostgreSQL > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend --=__PartE3C74DCE.2__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Description: HTML
update yourtable set passwordfield = md5(passwordfield)
 
watch out: md5 is irreversable! you can't "un_md5"


>>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01 15:08 >>>
John,

That was what I was looking for for a long time.

Now I will change my teller password account to md5.

Could someone suggest me how to change all passwords (PLAIN) to md5 ?

My real best regards
Ezequias

2007/3/1, John DeSoi <desoi@pgedit.com>:
> MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> hash passwords. For example:
>
> select md5('this is my password');
>
>                 md5
> ----------------------------------
> 210d53992dff432ec1b1a9698af9da16
> (1 row)
>
>
>
> On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
>
> > Thanks Andrej. But how can I use such algoritms in postgresql? arey
> > they defined in a function that I can call?
> >
> > Or, do I have to code one of those algorithm to use it in my
> > application?
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atencio samente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
--=__PartE3C74DCE.2__=-- From ezequias.rocha@gmail.com Thu Mar 1 14:58:11 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D56E39FB4EC for ; Thu, 1 Mar 2007 10:58:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 75289-02 for ; Thu, 1 Mar 2007 10:58:04 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id CA25F9FBAE7 for ; Thu, 1 Mar 2007 10:58:04 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so347123ugf for ; Thu, 01 Mar 2007 06:58:03 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UJ7QFuMX3EcnwxS84cn7mO6sQKZLy2jWBhjlMk+0YMWpC0AkdsCYUgXfn7pyU+u0gZNfdEG4SxLmNLwn7qYNI2q2w+wCyCnD33u+bPsqiDf0c0cCsRCwIFQZb1vO6T9MUWxLucnEsmX6UAaVVZHFkv9cnk5p8UDTTAq6M6OAdmo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=idGjTIGOpe9QPskmrW6WkXlni653Q/K5l0jzWKCnnzbuU133038BzBRGYMnu560LOWcyv+uuIF0G1be4LZ8RmBchL/MgOcDhDHIeyy+0nSNGqH8LO5xgCMaL47myYpjjGoEKyxHUYpTT7nP1smMBZ5QmmGKEVM83ZVdFkGXFdwU= Received: by 10.67.117.18 with SMTP id u18mr2086356ugm.1172761083273; Thu, 01 Mar 2007 06:58:03 -0800 (PST) Received: by 10.67.94.13 with HTTP; Thu, 1 Mar 2007 06:58:03 -0800 (PST) Message-ID: <55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com> Date: Thu, 1 Mar 2007 11:58:03 -0300 From: "Ezequias Rodrigues da Rocha" To: "Bart Degryse" Subject: Re: How to store a password encripted in a user definedtable Cc: PostgreSQL In-Reply-To: <45E6F4ED.A3DD.0030.0@indicator.be> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <55c095e90703010608w55a44b6ifbec7fe8f9fb98dd@mail.gmail.com> <45E6F4ED.A3DD.0030.0@indicator.be> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/11 X-Sequence-Number: 27649 I know it. Thank you so much. Ezequias Grettings from Brazil. 2007/3/1, Bart Degryse : > > > update yourtable set passwordfield = md5(passwordfield) > > watch out: md5 is irreversable! you can't "un_md5" > > > >>> "Ezequias Rodrigues da Rocha" 2007-03-01 > 15:08 >>> > > John, > > That was what I was looking for for a long time. > > Now I will change my teller password account to md5. > > Could someone suggest me how to change all passwords (PLAIN) to md5 ? > > My real best regards > Ezequias > > 2007/3/1, John DeSoi : > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > > hash passwords. For example: > > > > select md5('this is my password'); > > > > md5 > > ---------------------------------- > > 210d53992dff432ec1b1a9698af9da16 > > (1 row) > > > > > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey > > > they defined in a function that I can call? > > > > > > Or, do I have to code one of those algorithm to use it in my > > > application? > > > > > > > > John DeSoi, Ph.D. > > http://pgedit.com/ > > Power Tools for PostgreSQL > > > > > > ---------------------------(end of > broadcast)--------------------------- > > TIP 9: In versions below 8.0, the planner will ignore your desire to > > choose an index scan if your joining column's datatypes do not > > match > > From ezequias.rocha@gmail.com Thu Mar 1 15:02:36 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E44669FBE4C for ; Thu, 1 Mar 2007 11:02:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 76280-06 for ; Thu, 1 Mar 2007 11:02:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 045059FBE5A for ; Thu, 1 Mar 2007 11:02:20 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so348103ugf for ; Thu, 01 Mar 2007 07:02:18 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uTHpxQv+cJZwlfjUa1qFCnOHd2liR39urFHunXpauKi+9vGRMgFFggWfHX/fCaLWnUYlP7jo/JJbKpSREX7WM+RnnIlDDwaM6Og44oYyQY4KYyGGLjTH1S59dYCAumUWBuuLpse/PVQrFEKVwRbEddNmBBm5Dqj8aLdWMFMbvqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A9O54DLFwbSLVIV/CCz/C90DsykgY3IDLD3EXCREvPTtL551c53j//Y7URVAdhRYg87FQF0GE8GWH4pwUIQnpMQfOcaB/Xgq6aqTx4zxYoVklhHIk/e/YdFwkeHpxTfuz3GoVolNqtOEkfVfSS9bb4/WrvL6714bUvenxSMT/CU= Received: by 10.67.29.12 with SMTP id g12mr2150671ugj.1172761338802; Thu, 01 Mar 2007 07:02:18 -0800 (PST) Received: by 10.67.94.13 with HTTP; Thu, 1 Mar 2007 07:02:18 -0800 (PST) Message-ID: <55c095e90703010702k4920ca20r473154d934c8c8f8@mail.gmail.com> Date: Thu, 1 Mar 2007 12:02:18 -0300 From: "Ezequias Rodrigues da Rocha" To: "Bart Degryse" Subject: Re: How to store a password encripted in a user definedtable Cc: PostgreSQL In-Reply-To: <55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <55c095e90703010608w55a44b6ifbec7fe8f9fb98dd@mail.gmail.com> <45E6F4ED.A3DD.0030.0@indicator.be> <55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/12 X-Sequence-Number: 27650 Just another thing. Why md5 function return a different string from user role of postgresql ? It allways put an md5 string concated with another sequence of string. Why does it occurs ? Ezequias 2007/3/1, Ezequias Rodrigues da Rocha : > I know it. Thank you so much. > > Ezequias > Grettings from Brazil. > > 2007/3/1, Bart Degryse : > > > > > > update yourtable set passwordfield =3D md5(passwordfield) > > > > watch out: md5 is irreversable! you can't "un_md5" > > > > > > >>> "Ezequias Rodrigues da Rocha" 2007-03-01 > > 15:08 >>> > > > > John, > > > > That was what I was looking for for a long time. > > > > Now I will change my teller password account to md5. > > > > Could someone suggest me how to change all passwords (PLAIN) to md5 ? > > > > My real best regards > > Ezequias > > > > 2007/3/1, John DeSoi : > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > > > hash passwords. For example: > > > > > > select md5('this is my password'); > > > > > > md5 > > > ---------------------------------- > > > 210d53992dff432ec1b1a9698af9da16 > > > (1 row) > > > > > > > > > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > > > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey > > > > they defined in a function that I can call? > > > > > > > > Or, do I have to code one of those algorithm to use it in my > > > > application? > > > > > > > > > > > > John DeSoi, Ph.D. > > > http://pgedit.com/ > > > Power Tools for PostgreSQL > > > > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > > TIP 9: In versions below 8.0, the planner will ignore your desire to > > > choose an index scan if your joining column's datatypes do not > > > match > > > > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ From Bart.Degryse@indicator.be Thu Mar 1 15:17:09 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8EA1D9FBDE8 for ; Thu, 1 Mar 2007 11:17:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 22520-02 for ; Thu, 1 Mar 2007 11:17:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id 426549FBDD5 for ; Thu, 1 Mar 2007 11:17:04 -0400 (AST) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Thu, 01 Mar 2007 16:04:37 +0100 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Thu, 01 Mar 2007 16:17:01 +0100 Message-Id: <45E6FC74.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Thu, 01 Mar 2007 16:16:52 +0100 From: "Bart Degryse" To: "PostgreSQL" Cc: "Ezequias Rodrigues da Rocha" Subject: Re: How to store a password encripted in a userdefinedtable References: <675205.64473.qm@web55615.mail.re4.yahoo.com><55c095e90703010608 w55a44b6ifbec7fe8f9fb98dd@mail.gmail.com><45E6F4ED.A3DD.0030.0@indicator.be ><55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com><55c095e90703 010702k4920ca20r473154d934c8c8f8@mail.gmail.com> In-Reply-To: <55c095e90703010702k4920ca20r473154d934c8c8f8@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part5175FF74.1__=" X-imss-version: 2.046 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.6 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, HTML_40_50, HTML_MESSAGE, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200703/13 X-Sequence-Number: 27651 --=__Part5175FF74.1__= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit It doesn't do that for me. I've tried it on three different databases (of two different versions) as three different users and the result is always the same (as it should be): select USER, md5('password') current_user md5 bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99 current_user md5 bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99 current_user md5 logstocksys 5f4dcc3b5aa765d61d8327deb882cf99 Show us some statements. >>> "Ezequias Rodrigues da Rocha" 2007-03-01 16:02 >>> Just another thing. Why md5 function return a different string from user role of postgresql ? It allways put an md5 string concated with another sequence of string. Why does it occurs ? Ezequias 2007/3/1, Ezequias Rodrigues da Rocha : > I know it. Thank you so much. > > Ezequias > Grettings from Brazil. > > 2007/3/1, Bart Degryse : > > > > > > update yourtable set passwordfield = md5(passwordfield) > > > > watch out: md5 is irreversable! you can't "un_md5" > > > > > > >>> "Ezequias Rodrigues da Rocha" 2007-03-01 > > 15:08 >>> > > > > John, > > > > That was what I was looking for for a long time. > > > > Now I will change my teller password account to md5. > > > > Could someone suggest me how to change all passwords (PLAIN) to md5 ? > > > > My real best regards > > Ezequias > > > > 2007/3/1, John DeSoi : > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > > > hash passwords. For example: > > > > > > select md5('this is my password'); > > > > > > md5 > > > ---------------------------------- > > > 210d53992dff432ec1b1a9698af9da16 > > > (1 row) > > > > > > > > > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > > > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey > > > > they defined in a function that I can call? > > > > > > > > Or, do I have to code one of those algorithm to use it in my > > > > application? > > > > > > > > > > > > John DeSoi, Ph.D. > > > http://pgedit.com/ > > > Power Tools for PostgreSQL > > > > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > > TIP 9: In versions below 8.0, the planner will ignore your desire to > > > choose an index scan if your joining column's datatypes do not > > > match > > > > -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ --=__Part5175FF74.1__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Description: HTML
It doesn't do that for me. I've tried it on three different databases (of two different versions) as three different users and the result is always the same (as it should be):
 
select USER, md5('password')
 
current_user    md5
bigdbuser       5f4dcc3b5aa765d61d8327deb882cf99
 
current_user    md5
bigdbsys        5f4dcc3b5aa765d61d8327deb882cf99
 
current_user    md5
logstocksys     5f4dcc3b5aa765d61d8327deb882cf99
 
Show us some statements.
 
>>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01 16:02 >>>
Just another thing.

Why md5 function return a different string from user role of postgresql ?

It allways put an md5 string concated with another sequence of string.

Why does it occurs ?
Ezequias

2007/3/1, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
> I know it. Thank you so much.
>
> Ezequias
> Grettings from Brazil.
>
> 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
> >
> >
> > update yourtable set passwordfield = md5(passwordfield)
> >
> > watch out: md5 is irreversable! you can't "un_md5"
> >
> >
> > >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
> > 15:08 >>>
> >
> > John,
> >
> > That was what I was lo oking for for a long time.
> >
> > Now I will change my teller password account to md5.
> >
> > Could someone suggest me how to change all passwords (PLAIN) to md5 ?
> >
> > My real best regards
> > Ezequias
> >
> > 2007/3/1, John DeSoi <desoi@pgedit.com>:
> > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> > > hash passwords. For example:
> > >
> > > select md5('this is my password');
> > >
> > >                 md5
> > > ----------------------------------
> > > 210d53992dff432ec1b1a9698af9da16
> > > (1 row)
> > >
> > >
> > >
> > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> > >
> > > > Thanks Andre j. But how can I use such algoritms in postgresql? arey
> > > > they defined in a function that I can call?
> > > >
> > > > Or, do I have to code one of those algorithm to use it in my
> > > > application?
> > >
> > >
> > >
> > > John DeSoi, Ph.D.
> > > http://pgedit.com/
> > > Power Tools for PostgreSQL
> > >
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > >        choose an index scan if your joining column's datatypes do not
> > >        match
> > >
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
--=__Part5175FF74.1__=-- From ezequias.rocha@gmail.com Thu Mar 1 16:53:37 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 888A49FC0E4 for ; Thu, 1 Mar 2007 12:53:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 93382-03 for ; Thu, 1 Mar 2007 12:53:23 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id C4E919FC06F for ; Thu, 1 Mar 2007 12:53:22 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so374739ugf for ; Thu, 01 Mar 2007 08:53:21 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HCNNRGTHvMAF+khmGvIhMs9x3VwloUdZU1ZpRMrH80ewtoVdw9LOE8uiNhsQaM2cXaOg3mcD2WPbEz3e6EFTQVl6bHLNp6c7u2A6SLlw2fEQxLsjaQvB3SBIS1AKtBP7GLe4om6I8AyRdyAAbD0bJLIipryK/pg2hZnsiB+jMik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=psTCCfq8DRyL4h8IOFjqytirLQ0ecupwuvvKMln3WQOUAQ/239G/OwE9N31OOfr3XVZqpGvFD7UBIhFV2MXzD62Y0OwlzNmkc0zeulmUq1pkb5mlppqy7uA8Hk3SftsPyhrFy/ks8hj+Kd3YNsijfcbG6Jkzz/ghXkVYO/qq1f0= Received: by 10.66.225.1 with SMTP id x1mr2364164ugg.1172768001164; Thu, 01 Mar 2007 08:53:21 -0800 (PST) Received: by 10.67.94.13 with HTTP; Thu, 1 Mar 2007 08:53:21 -0800 (PST) Message-ID: <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> Date: Thu, 1 Mar 2007 13:53:21 -0300 From: "Ezequias Rodrigues da Rocha" To: "Bart Degryse" Subject: Re: How to store a password encripted in a userdefinedtable Cc: PostgreSQL In-Reply-To: <45E6FC74.A3DD.0030.0@indicator.be> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com> <55c095e90703010702k4920ca20r473154d934c8c8f8@mail.gmail.com> <45E6FC74.A3DD.0030.0@indicator.be> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/16 X-Sequence-Number: 27654 I am just passing the database owner password (postgresql autentication) to the statement: Select md5('the password I have in my mind') and compare with the password pgAdmin3 shows me. They are completely different. Ezequias 2007/3/1, Bart Degryse : > > > It doesn't do that for me. I've tried it on three different databases (of > two different versions) as three different users and the result is always > the same (as it should be): > > select USER, md5('password') > > current_user md5 > bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99 > > current_user md5 > bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99 > > > current_user md5 > logstocksys 5f4dcc3b5aa765d61d8327deb882cf99 > > Show us some statements. > > > >>> "Ezequias Rodrigues da Rocha" 2007-03-01 > 16:02 >>> > > Just another thing. > > Why md5 function return a different string from user role of postgresql ? > > It allways put an md5 string concated with another sequence of string. > > Why does it occurs ? > Ezequias > > 2007/3/1, Ezequias Rodrigues da Rocha : > > I know it. Thank you so much. > > > > Ezequias > > Grettings from Brazil. > > > > 2007/3/1, Bart Degryse : > > > > > > > > > update yourtable set passwordfield =3D md5(passwordfield) > > > > > > watch out: md5 is irreversable! you can't "un_md5" > > > > > > > > > >>> "Ezequias Rodrigues da Rocha" 2007-03-= 01 > > > 15:08 >>> > > > > > > John, > > > > > > That was what I was looking for for a long time. > > > > > > Now I will change my teller password account to md5. > > > > > > Could someone suggest me how to change all passwords (PLAIN) to md5 ? > > > > > > My real best regards > > > Ezequias > > > > > > 2007/3/1, John DeSoi : > > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to > > > > hash passwords. For example: > > > > > > > > select md5('this is my password'); > > > > > > > > md5 > > > > ---------------------------------- > > > > 210d53992dff432ec1b1a9698af9da16 > > > > (1 row) > > > > > > > > > > > > > > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: > > > > > > > > > Thanks Andrej. But how can I use such algoritms in postgresql? ar= ey > > > > > they defined in a function that I can call? > > > > > > > > > > Or, do I have to code one of those algorithm to use it in my > > > > > application? > > > > > > > > > > > > > > > > John DeSoi, Ph.D. > > > > http://pgedit.com/ > > > > Power Tools for PostgreSQL > > > > > > > > > > > > ---------------------------(end of > > > broadcast)--------------------------- > > > > TIP 9: In versions below 8.0, the planner will ignore your desire t= o > > > > choose an index scan if your joining column's datatypes do n= ot > > > > match > > > > > > > > > -- > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D > Atenciosamente > (Sincerely) > Ezequias Rodrigues da Rocha > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > A pior das democracias ainda =E9 melhor do que a melhor das ditaduras > The worst of democracies is still better than the better of dictatorships > http://ezequiasrocha.blogspot.com/ > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ From pgsql@Sheeky.Biz Thu Mar 1 17:14:48 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0B3CC9FBE41 for ; Thu, 1 Mar 2007 13:14:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 30347-03 for ; Thu, 1 Mar 2007 13:14:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by postgresql.org (Postfix) with ESMTP id 4761D9FBD21 for ; Thu, 1 Mar 2007 13:14:32 -0400 (AST) Received: from ppp247-71.static.internode.on.net (HELO [192.168.8.200]) ([203.122.247.71]) by ipmail02.adl2.internode.on.net with ESMTP; 02 Mar 2007 03:44:20 +1030 X-IronPort-AV: i="4.14,237,1170595800"; d="scan'208"; a="91627925:sNHT3297522984" Message-ID: <45E709E7.8090601@Sheeky.Biz> Date: Fri, 02 Mar 2007 03:44:15 +1030 From: Shane Ambler User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Ezequias Rodrigues da Rocha CC: Bart Degryse , PostgreSQL Subject: Re: How to store a password encripted in a userdefinedtable References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <55c095e90703010658u72d22d38g54256769e01cd8fb@mail.gmail.com> <55c095e90703010702k4920ca20r473154d934c8c8f8@mail.gmail.com> <45E6FC74.A3DD.0030.0@indicator.be> <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> In-Reply-To: <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.023 tagged_above=0 required=5 tests=AWL, BAYES_50, BIZ_TLD, SPF_HELO_PASS X-Spam-Level: ** X-Archive-Number: 200703/17 X-Sequence-Number: 27655 Ezequias Rodrigues da Rocha wrote: > I am just passing the database owner password (postgresql > autentication) to the statement: > > Select md5('the password I have in my mind') and compare with the > password pgAdmin3 shows me. > > They are completely different. Try SELECT 'md5'||md5('the password I have in my mind'||'userlogin'); > Ezequias > > 2007/3/1, Bart Degryse : >> >> >> It doesn't do that for me. I've tried it on three different databases (of >> two different versions) as three different users and the result is always >> the same (as it should be): >> >> select USER, md5('password') >> >> current_user md5 >> bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99 >> >> current_user md5 >> bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99 >> >> >> current_user md5 >> logstocksys 5f4dcc3b5aa765d61d8327deb882cf99 >> >> Show us some statements. >> >> >> >>> "Ezequias Rodrigues da Rocha" 2007-03-01 >> 16:02 >>> >> >> Just another thing. >> >> Why md5 function return a different string from user role of postgresql ? >> >> It allways put an md5 string concated with another sequence of string. >> >> Why does it occurs ? >> Ezequias >> >> 2007/3/1, Ezequias Rodrigues da Rocha : >> > I know it. Thank you so much. >> > >> > Ezequias >> > Grettings from Brazil. >> > >> > 2007/3/1, Bart Degryse : >> > > >> > > >> > > update yourtable set passwordfield = md5(passwordfield) >> > > >> > > watch out: md5 is irreversable! you can't "un_md5" >> > > >> > > >> > > >>> "Ezequias Rodrigues da Rocha" >> 2007-03-01 >> > > 15:08 >>> >> > > >> > > John, >> > > >> > > That was what I was looking for for a long time. >> > > >> > > Now I will change my teller password account to md5. >> > > >> > > Could someone suggest me how to change all passwords (PLAIN) to md5 ? >> > > >> > > My real best regards >> > > Ezequias >> > > >> > > 2007/3/1, John DeSoi : >> > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to >> > > > hash passwords. For example: >> > > > >> > > > select md5('this is my password'); >> > > > >> > > > md5 >> > > > ---------------------------------- >> > > > 210d53992dff432ec1b1a9698af9da16 >> > > > (1 row) >> > > > >> > > > >> > > > >> > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote: >> > > > >> > > > > Thanks Andrej. But how can I use such algoritms in postgresql? >> arey >> > > > > they defined in a function that I can call? >> > > > > >> > > > > Or, do I have to code one of those algorithm to use it in my >> > > > > application? >> > > > >> > > > >> > > > >> > > > John DeSoi, Ph.D. >> > > > http://pgedit.com/ >> > > > Power Tools for PostgreSQL >> > > > >> > > > >> > > > ---------------------------(end of >> > > broadcast)--------------------------- >> > > > TIP 9: In versions below 8.0, the planner will ignore your >> desire to >> > > > choose an index scan if your joining column's datatypes >> do not >> > > > match >> > > > >> > >> >> >> -- >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> Atenciosamente >> (Sincerely) >> Ezequias Rodrigues da Rocha >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >> A pior das democracias ainda é melhor do que a melhor das ditaduras >> The worst of democracies is still better than the better of dictatorships >> http://ezequiasrocha.blogspot.com/ >> > > -- Shane Ambler pgSQL@Sheeky.Biz Get Sheeky @ http://Sheeky.Biz From aklaver@comcast.net Thu Mar 1 17:18:29 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CF1F99FBE47 for ; Thu, 1 Mar 2007 13:18:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 98989-02 for ; Thu, 1 Mar 2007 13:18:22 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by postgresql.org (Postfix) with ESMTP id D7E619FBD9B for ; Thu, 1 Mar 2007 13:18:21 -0400 (AST) Received: from [192.168.0.9] (c-24-17-161-80.hsd1.wa.comcast.net[24.17.161.80]) by comcast.net (rwcrmhc15) with ESMTP id <20070301171820m15004sacde>; Thu, 1 Mar 2007 17:18:20 +0000 From: Adrian Klaver To: pgsql-sql@postgresql.org Subject: Re: How to store a password encripted in a userdefinedtable Date: Thu, 1 Mar 2007 09:19:04 -0800 User-Agent: KMail/1.9.1 Cc: "Ezequias Rodrigues da Rocha" , "Bart Degryse" References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <45E6FC74.A3DD.0030.0@indicator.be> <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> In-Reply-To: <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703010919.05035.aklaver@comcast.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.709 tagged_above=0 required=5 tests=BAYES_50, DNS_FROM_RFC_POST X-Spam-Level: * X-Archive-Number: 200703/18 X-Sequence-Number: 27656 On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote: > I am just passing the database owner password (postgresql > autentication) to the statement: > > Select md5('the password I have in my mind') and compare with the > password pgAdmin3 shows me. > > They are completely different. > > Ezequias > Try select md5('password'||'user') The generated hash is a combination of the password and the user name. -- Adrian Klaver aklaver@comcast.net From ezequias.rocha@gmail.com Thu Mar 1 18:02:28 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5F4ED9FB3B2 for ; Thu, 1 Mar 2007 14:02:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 64509-08 for ; Thu, 1 Mar 2007 14:02:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 752D69FB24B for ; Thu, 1 Mar 2007 14:02:15 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so390331ugf for ; Thu, 01 Mar 2007 10:02:13 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QN4M1ZI/EHYNmTcqTwuZwtnTdJcDdZCtnRg4+3YsVb7TMJtgHaCb+Pvr8ciKwLad06M1Dhb4JSNhpsQeC/Y2XtOWA4nbnBEGDqmnfAQ4U0WN2YOcsCYMFu6FZh2zMa9RR0Nw3uZPue4sUXRyFbJnrioBXXrpqzzBZFYWNOc24Ps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HFE9l7sJ4MjLDECrI4jtX5x39jPc3If30RlOTP7Tbx90z/XKYqwHNGpL4kchV+VfsAaSsjMmAHdLpoxGjcYJM3VaXQ6TLmQDqq+GtofvePl4PEthFgCxrBJt4DqYuccJif7EJIJEVxr3H1D+Ea/Rw8vklWdOzdKgWJJde26UggI= Received: by 10.67.99.1 with SMTP id b1mr2429852ugm.1172772133236; Thu, 01 Mar 2007 10:02:13 -0800 (PST) Received: by 10.67.94.13 with HTTP; Thu, 1 Mar 2007 10:02:13 -0800 (PST) Message-ID: <55c095e90703011002j6deb43e5n4ce40459b2ba8d96@mail.gmail.com> Date: Thu, 1 Mar 2007 15:02:13 -0300 From: "Ezequias Rodrigues da Rocha" To: "Adrian Klaver" Subject: Re: How to store a password encripted in a userdefinedtable Cc: pgsql-sql@postgresql.org, "Bart Degryse" In-Reply-To: <200703010919.05035.aklaver@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <675205.64473.qm@web55615.mail.re4.yahoo.com> <45E6FC74.A3DD.0030.0@indicator.be> <55c095e90703010853n2e34a260pd7fb8e9430d789a@mail.gmail.com> <200703010919.05035.aklaver@comcast.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/19 X-Sequence-Number: 27657 Perfect ! That's it. Another information I doesn't have. Great to be part of this list. Thank you Adrian 2007/3/1, Adrian Klaver : > On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote: > > I am just passing the database owner password (postgresql > > autentication) to the statement: > > > > Select md5('the password I have in my mind') and compare with the > > password pgAdmin3 shows me. > > > > They are completely different. > > > > Ezequias > > > > Try select md5('password'||'user') > The generated hash is a combination of the password and the user name. > -- > Adrian Klaver > aklaver@comcast.net > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ From eflores767003@yahoo.com.mx Thu Mar 1 19:49:44 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1EBF59FB61C for ; Thu, 1 Mar 2007 15:49:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 91179-04 for ; Thu, 1 Mar 2007 15:49:34 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from web55606.mail.re4.yahoo.com (web55606.mail.re4.yahoo.com [206.190.58.230]) by postgresql.org (Postfix) with SMTP id 8FC339FB612 for ; Thu, 1 Mar 2007 15:49:34 -0400 (AST) Received: (qmail 20035 invoked by uid 60001); 1 Mar 2007 19:49:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.mx; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=osYg7wPFEa/NJHm8rRLxwzbZcUYgHfGQFL56Pl8sVQldDJe5BrTodPzhV6hHGrHePryXFlWUZi0ETm3+sfG35+dDL3fusrdBccqP7pKVzJz19rLBfI+dBozEa/djD+3xg7cdwpJf/sfg/IrggpX9dAKpmSxP4mC5UyR4J+bgnRU=; X-YMail-OSG: SF7exmEVM1lvhsaMv8qLt1GYCRy7uUWw5Z1Wzy2FJVd9Vt0e43.oU7BY3GE3QhkUZUi_9XX1JOAvVHAT86JTnH9TSiwDLREB0Tqx8lniegCi7Llp7JAns9leDBfJ8BoNm629aBZp71nqdQ8- Received: from [165.98.140.116] by web55606.mail.re4.yahoo.com via HTTP; Thu, 01 Mar 2007 11:49:33 PST X-Mailer: YahooMailRC/368.8 YahooMailWebService/0.6.132.8 Date: Thu, 1 Mar 2007 11:49:33 -0800 (PST) From: Eugenio Flores Subject: Re: How to store a password encripted in a user defined table To: John DeSoi Cc: Andrej Ricnik-Bay , PostgreSQL MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1274382325-1172778573=:3417" Message-ID: <278410.3417.qm@web55606.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.331 tagged_above=0 required=5 tests=AWL, BAYES_40, HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200703/20 X-Sequence-Number: 27658 --0-1274382325-1172778573=:3417 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for your anwers. They have been very useful.=0A=0AThanks again.=0A= =0A=0A----- Mensaje original ----=0ADe: John DeSoi =0APar= a: Eugenio Flores =0ACC: Andrej Ricnik-Bay ; PostgreSQL =0AEnviado: jue= ves, 1 de marzo, 2007 5:25:28=0AAsunto: Re: [SQL] How to store a password e= ncripted in a user defined table=0A=0A=0AMD5 is built-in to PostgreSQL. It = is what PostgreSQL itself uses to =0Ahash passwords. For example:=0A=0Asel= ect md5('this is my password');=0A=0A md5=0A----------------= ------------------=0A210d53992dff432ec1b1a9698af9da16=0A(1 row)=0A=0A=0A=0A= On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:=0A=0A> Thanks Andrej. But= how can I use such algoritms in postgresql? arey =0A> they defined in a f= unction that I can call?=0A>=0A> Or, do I have to code one of those algorit= hm to use it in my =0A> application?=0A=0A=0A=0AJohn DeSoi, Ph.D.=0Ahttp:/= /pgedit.com/=0APower Tools for PostgreSQL=0A=0A=0A-------------------------= --(end of broadcast)---------------------------=0ATIP 9: In versions below = 8.0, the planner will ignore your desire to=0A choose an index scan i= f your joining column's datatypes do not=0A match=0A=0A=0A=09=0A=09= =0A=09=09=0A___________________________________________________________ =0A= Do You Yahoo!? =0ALa mejor conexi=F3n a Internet y 2GB extra a tu c= orreo por $100 al mes. http://net.yahoo.com.mx =0A --0-1274382325-1172778573=:3417 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for your anwers. They have been very usefu= l.
=0A
 
=0A
Thanks again.

= =0A
----- Mensaje original ----
De: John DeSoi <desoi@pgedit= .com>
Para: Eugenio Flores <eflores767003@yahoo.com.mx>
CC: = Andrej Ricnik-Bay <andrej.groups@gmail.com>; PostgreSQL <pgsql-sql= @postgresql.org>
Enviado: jueves, 1 de marzo, 2007 5:25:28
Asunto:= Re: [SQL] How to store a password encripted in a user defined table
=0A
MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses t= o  
hash passwords. For example:

select md5('this is my= password');

         &= nbsp;      md5
---------------------------= -------
210d53992dff432ec1b1a9698af9da16
(1 row)



On Ma= r 1, 2007, at 6:06 AM, Eugenio Flores wrote:

> Thanks Andrej. But= how can I use such algoritms in postgresql? arey  
> they = defined in a function that I can call?
>
> Or, do I have to cod= e one of those algorithm to use it in my  
> application?


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


----= -----------------------(end of broadcast)---------------------------
TIP= 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your jo= ining column's datatypes do not
       mat= ch
=0A


=0A=09=09
=0AD= o You Yahoo!? =0ALa mejor conexi=F3n a Internet y 2GB extra a tu cor= reo por $100 al mes. http://net.yahoo.c= om.mx =0A --0-1274382325-1172778573=:3417--