Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 76804B5DBEE for ; Sat, 8 Oct 2011 01:50:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 00641-10 for ; Sat, 8 Oct 2011 04:50:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-yx0-f174.google.com (mail-yx0-f174.google.com [209.85.213.174]) by mail.postgresql.org (Postfix) with ESMTP id D1B0DB5DBC4 for ; Sat, 8 Oct 2011 01:50:18 -0300 (ADT) Received: by yxl31 with SMTP id 31so4206926yxl.19 for ; Fri, 07 Oct 2011 21:50:18 -0700 (PDT) Received: by 10.236.129.238 with SMTP id h74mr13904860yhi.99.1318049417974; Fri, 07 Oct 2011 21:50:17 -0700 (PDT) Received: from ayaki.localdomain ([119.11.11.201]) by mx.google.com with ESMTPS id n80sm16233911yhh.7.2011.10.07.21.50.13 (version=SSLv3 cipher=OTHER); Fri, 07 Oct 2011 21:50:17 -0700 (PDT) Message-ID: <4E8FD681.6050409@ringerc.id.au> Date: Sat, 08 Oct 2011 12:50:09 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: "Alexander James Spence [axs]" CC: "'pgsql-admin@postgresql.org'" Subject: Re: password problems References: <8EDB6E83019BEC4B9153122CFB928AF001F646319E89@MAILBOX.staff.aber.ac.uk> In-Reply-To: <8EDB6E83019BEC4B9153122CFB928AF001F646319E89@MAILBOX.staff.aber.ac.uk> 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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/27 X-Sequence-Number: 38479 On 10/07/2011 10:14 PM, Alexander James Spence [axs] wrote: > We have updated our server to 9.1 the previous version used am external > file for authentication (unix crypt) PostgreSQL's basic auth scheme hasn't changed in a long time, so it's pretty unlikely that the previous version inherently used an external file for auth. Is it possible the previous version was _configured_ to, via pg_hba.conf ? If not: Which previous version, exactly? On what OS and (if linux) distro? What was the external file called, where was it and what is its format? Are you talking about /etc/passwd or something else? Is it possible you were authenticating via OS usernames and passwords before, by using the pluggable authentication modules (PAM) subsystem in your OS via pg_hba.conf? > Can I continue to use this file if so how is it referenced in pg_hba.conf? Alas, my psychic powers are insufficient to answer this question. Perhaps if you said something about what the file is and where it is... See the manual: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html for more info on pg_hba.conf, in particular the auth-method section and the elaboraton of it given in this manual page, which the pg_hba.conf page links to: http://www.postgresql.org/docs/current/static/auth-methods.html > If I want to continue to use unix crypt passwords how do I get them into > the database. I have seen references to crypt and gen_salt but cannot > get these to work. Do you refer to pgcrypto? (Tip: If you refer to something, link to it so others know for certain what you're talking about). http://www.postgresql.org/docs/current/interactive/pgcrypto.html If so: that's for application-level crypto work, when your app wants to do crypto in the database. For database user authentication you probably want ALTER USER: http://www.postgresql.org/docs/current/interactive/sql-alteruser.html As far as I know, PostgreSQL's default built-in user database uses a salted md5 hash for user passwords. This will prevent you from copying existing `crypt'ed passwords over directly into PostgreSQL's internal user list, as it's a different hash algorithm. You should still be able to use other auth methods like PAM to use them, though. -- Craig Ringer