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 84D2730EF76 for ; Mon, 16 Jun 2003 19:27:50 +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 93838-05 for ; Mon, 16 Jun 2003 16:27:40 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id DF35030EE4F for ; Mon, 16 Jun 2003 16:27:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5GJRXU6006160; Mon, 16 Jun 2003 15:27:33 -0400 (EDT) To: Raj Mathur Cc: pgsql-admin@postgresql.org Subject: Re: Move passwords between databases In-reply-to: <16109.59426.74922.358335@mail.linux-delhi.org> References: <16109.51463.688614.39084@mail.linux-delhi.org> <2913.1055774886@sss.pgh.pa.us> <16109.59426.74922.358335@mail.linux-delhi.org> Comments: In-reply-to Raj Mathur message dated "Mon, 16 Jun 2003 21:24:10 +0530" Date: Mon, 16 Jun 2003 15:27:33 -0400 Message-ID: <6159.1055791653@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/180 X-Sequence-Number: 9171 Raj Mathur writes: > 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 That's not going to work, because the user name is included into the password encryption algorithm, so two different usernames with the same cleartext password are going to have two different encrypted passwords. (This is a feature, not a bug.) You can transfer the same usernames with the same passwords from one system to another using the method shown above. You cannot assign one user's password to another username this way. regards, tom lane