Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AF2E947621C; Mon, 20 Jan 2003 21:49:38 -0500 (EST) Received: from fw.mik.co.id (unknown [202.150.95.134]) by postgresql.org (Postfix) with ESMTP id 180F2476D6C; Mon, 20 Jan 2003 21:46:21 -0500 (EST) Received: (from root@localhost) by fw.mik.co.id (8.9.3/8.9.3) id JAA25878; Tue, 21 Jan 2003 09:50:17 +0700 From: Fery@mik.co.id Received: (from mail@localhost) by fw.mik.co.id (8.9.3/8.9.3) id JAA25838; Tue, 21 Jan 2003 09:50:13 +0700 Received: by fw via smwrap Version 1.0 id smwrap7Xg6bN; Tue Jan 21 09:49:51 2003 Subject: Re: Creating md5 passwords in PHP for the PostgreSQL pg_shadow table To: Matthew Horoschun Cc: , , Message-ID: Date: Wed, 22 Jan 2003 09:51:04 +0700 09:51:49 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: by ISG Firewall 2.0/ Pandawa PS Team 2002 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/23 X-Sequence-Number: 1768 Dear All, When I do CREATE USER [user] WITH PASSWORD 'password' why the encryption didn't work ? I saw in the pg_shadow table look like as i set the password ? SELECT * FROM PG_SHADOW in password field will shown : 'password' ?????? Is there any way to activate md5 encryption in PostgreSQL ? or It was done by compiling it when first installation ???? thankss Best Regards, Fery Gideon IT Specialist PT. Mitra Integrasi Komputindo ASPAC Kuningan - 8th floor, Suite 805 Jl. H.R. Rasuna Said Kav. X-2 No. 4, Jakarta 12950 Phone: (62-21) 522-8322(ext 102), Fax: (62-21) 522-8321 e-mail: fery@mik.co.id Matthew Horoschun .com.au> cc: pgsql-php@postgresql.org Sent by: Subject: Re: [PHP] Creating md5 passwords in PHP for the PostgreSQL pgsql-php-owner@post pg_shadow table gresql.org 01/21/2003 05:10 AM Hi David, Thanks for the reply. Unfortunately, thats not quite the problem. I want to create passwords that will work in the pg_shadow table. So, I need them to be calculated in exactly the same way PostgreSQL does when you do a CREATE USER matthew WITH PASSWORD testing. For example, If I create a user in PostgreSQL called 'matthew' with password 'testing', I get pg_shadow entry with passwd: md5759af56ffaf865413f7a50b4fae20ea3 but, if I do a simple md5 of 'testing' like you've done below, I get: ae2b1fca515949e5d54fb22b8ed95575 As you can see, those don't match. Perhaps I'm missing something though? Cheers Matthew. On Tuesday, January 21, 2003, at 05:27 AM, David Busby wrote: > Matthew, > I just use something like > $pass = $_POST['pass']; > $e_pass = md5($passs); > Maybe not as secure as two md5s, but have you ever tried to > reverse one > md5 checksum? -- Matthew Horoschun Network Administrator CanPrint Communications Pty. Ltd. Mobile: 0417 282 378 Direct: (02) 6295 4544 Telephone: (02) 6295 4422 Facsimile: (02) 6295 4473 ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)