Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5CADD47633A for ; Thu, 3 Oct 2002 11:49:53 -0400 (EDT) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 1E119475F18 for ; Thu, 3 Oct 2002 11:49:47 -0400 (EDT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 1345364; Thu, 03 Oct 2002 08:26:35 -0700 Message-ID: <3D9C66C7.4070102@joeconway.com> Date: Thu, 03 Oct 2002 08:48:23 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jodi Kanter Cc: Postgres Admin List Subject: Re: password encryption References: <00da01c26af1$48cd4570$de138f80@virginia.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/11 X-Sequence-Number: 5869 Jodi Kanter wrote: > We are currently using the pg_passwd utility to encrypt passwords. > Someone here told me that I can now encrypt passwords within postgresql > so that they are not stored in plain text in the pg_shadow file. > Is this true? I cannot seem to find any mention of it in my postgresql > books but it's quite possible that they were all written prior to the > release of 7.2. See http://www.postgresql.org/idocs/index.php?runtime-config.html , a bit more than half way down: "PASSWORD_ENCRYPTION (boolean) When a password is specified in CREATE USER or ALTER USER without writing either ENCRYPTED or UNENCRYPTED, this flag determines whether the password is to be encrypted. The default is off (do not encrypt the password), but this choice may change in a future release. " You can change this in postgresql.conf. Note that ENCRYPTED is the default as of 7.3. Also see ALTER USER: http://www.postgresql.org/idocs/index.php?sql-alteruser.html And pg_hba.conf: http://www.postgresql.org/idocs/index.php?client-authentication.html#PG-HBA-CONF Look for md5. The basic idea is that ENCRYPTED vs UNENCRYPTED default is controlled by PASSWORD_ENCRYPTION in the postgresql.conf file. ALTER USER can explicitly set a user's password as ENCRYPTED. You need to modify pg_hba.conf to allow "md5" instead of "password" HTH, Joe