Re: Move passwords between databases

Поиск
Список
Период
Сортировка
От Raj Mathur
Тема Re: Move passwords between databases
Дата
Msg-id 16109.59426.74922.358335@mail.linux-delhi.org
обсуждение исходный текст
Ответ на Re: Move passwords between databases  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Move passwords between databases  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

    Tom> Raj Mathur <raju@linux-delhi.org> 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: <enter 'raju' here>
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: how do I get rid of huge sorttemp files?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: psql sequence question