X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 91FC430EF17 for ; Mon, 16 Jun 2003 15:54:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 47167-08 for ; Mon, 16 Jun 2003 12:54:20 -0300 (ADT) Received: from ns3.biznetindia.com (unknown [203.200.89.83]) by svr1.postgresql.org (Postfix) with ESMTP id A16A630EEEC for ; Mon, 16 Jun 2003 12:54:19 -0300 (ADT) Received: from mail.linux-delhi.org ([203.122.36.68]) by ns3.biznetindia.com (8.12.8/8.12.5) with ESMTP id h5GFsEgC017134 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Mon, 16 Jun 2003 21:24:15 +0530 Received: from mail.linux-delhi.org (localhost [127.0.0.1]) by mail.linux-delhi.org (8.12.8/8.12.5) with ESMTP id h5GFsBWJ009657 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 16 Jun 2003 21:24:11 +0530 Received: (from raju@localhost) by mail.linux-delhi.org (8.12.8/8.12.8/Submit) id h5GFsA6b009653; Mon, 16 Jun 2003 21:24:10 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16109.59426.74922.358335@mail.linux-delhi.org> Date: Mon, 16 Jun 2003 21:24:10 +0530 To: pgsql-admin@postgresql.org Subject: Re: Move passwords between databases In-Reply-To: <2913.1055774886@sss.pgh.pa.us> References: <16109.51463.688614.39084@mail.linux-delhi.org> <2913.1055774886@sss.pgh.pa.us> X-Mailer: VM 7.07 under 21.4 (patch 8) "Honest Recruiter" XEmacs Lucid From: Raj Mathur X-Archive-Number: 200306/169 X-Sequence-Number: 9160 >>>>> "Tom" == Tom Lane writes: Tom> Raj Mathur writes: >> Using Postgresql 7.2.3 on Linux, is there an easy way to >> transfer user passwords from one database to another? Tom> You could look at what pg_dumpall --globals-only does. Tried that, doesn't seem to work (this is on a single system): mdu=# alter user raju with encrypted password 'raju'; ALTER USER mdu=# select passwd from pg_shadow where usename='raju'; passwd ------------------------------------- md5ef70c430d5ed1ed52bd2ae960bb8ebe4 (1 row) mdu=# create user xxx with password 'md5ef70c430d5ed1ed52bd2ae960bb8ebe4'; CREATE USER mdu=# \q [raju@mail raju]$ psql mdu xxx Password: psql: FATAL 1: Password authentication failed for user "xxx" >> I have an application that creates data (and users) centrally >> and then distributes them to remote databases. I can transfer >> everything else, but do not know how to transfer MD5 passwords. Tom> AFAIK you can just do it. The CREATE or ALTER USER command Tom> should recognize the password as already encrypted and not Tom> munge it. Are you sure you are using the correct pg_hba.conf Tom> setup on the destination system? The entry is the same in both: local all md5 The application updating the passwords is running locally on both systems. Any clues? Regards, -- Raju -- Raj Mathur raju@kandalaya.org http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F It is the mind that moves