Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 65A479F9ED0 for ; Tue, 17 Oct 2006 13:55:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 73876-05 for ; Tue, 17 Oct 2006 16:55:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.umpa-us.com (mail.umpa-us.com [64.9.53.20]) by postgresql.org (Postfix) with ESMTP id 105CA9F93A0 for ; Tue, 17 Oct 2006 13:54:59 -0300 (ADT) Received: (qmail 6886 invoked by uid 511); 17 Oct 2006 12:54:59 -0400 Received: from 64.9.53.17 by umpa.us (envelope-from , uid 509) with qmail-scanner-1.25-st-qms (clamdscan: 0.83/792. spamassassin: 3.0.2. perlscan: 1.25-st-qms. Clear:RC:0(64.9.53.17):SA:0(-4.0/4.0):. Processed in 2.157801 secs); 17 Oct 2006 16:54:59 -0000 X-Antivirus-UMPA-Mail-From: dev@umpa-us.com via umpa.us X-Antivirus-UMPA: 1.25-st-qms (Clear:RC:0(64.9.53.17):SA:0(-4.0/4.0):. Processed in 2.157801 secs Process 6864) Received: from scutum.umpa-us.com (HELO LT003) (dev@umpa-us.com@64.9.53.17) by mail.umpa-us.com with SMTP; 17 Oct 2006 12:54:56 -0400 From: "DEV" To: Subject: Re: Database users Passwords Date: Tue, 17 Oct 2006 12:54:51 -0400 Message-ID: <008101c6f20c$f6babb80$0b01a8c0@LT003> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1161102985.31645.100.camel@dogma.v10.wvs> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Thread-Index: AcbyC+/lT5T/iRlPR1KNCZsNzFr6EgAAOlIg X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/840 X-Sequence-Number: 102366 Okay but the issue I have is that I have the passwords already generated and in crypt() format and would love to just use them if at all possible? -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Jeff Davis Sent: Tuesday, October 17, 2006 12:36 PM To: DEV Cc: pgsql-general@postgresql.org; pgsql-docs@postgresql.org Subject: Re: [GENERAL] Database users Passwords On Tue, 2006-10-17 at 10:41 -0400, DEV wrote: > Hello all, > > I have user information in a table that I want to use to add > users to the user roles tables that are part of postgresql. My > question is this: the passwords in my user table are in there as a > text file with the data being encrypted using the crypt function, is > there a way I can use this crypt password when I do a "CREATE ROLE > userid LOGIN PASSWORD 'crypt password' NOSUPERUSER INHERIT NOCREATEDB > NOCREATEROLE" I know that in the current CREATE ROLE I have listed > will take a clear text password and encrypt it for me. What do I need > to change to use an encrypted password? > If user is foo and password is bar, do: =# select md5('barfoo'); LOG: duration: 0.140 ms statement: select md5('barfoo'); md5 ---------------------------------- 96948aad3fcae80c08a35c9b5958cd89 (1 row) =# create role foo login password 'md596948aad3fcae80c08a35c9b5958cd89' nosuperuser inherit nocreatedb nocreaterole; This seems to be lacking in the docs. At least, the only place I found this information was a user comment in the 8.0 docs. Is this already in the 8.1 docs? Should we add a description of the way postgresql does the md5 hashes in the CREATE ROLE section? Regards, Jeff Davis ---------------------------(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