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/