From: | "Shoaib Mir" <shoaibmir(at)gmail(dot)com> |
---|---|
To: | "George Heller" <george(dot)heller(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Password for postgres |
Date: | 2007-03-08 07:18:32 |
Message-ID: | bf54be870703072318v5c4dba80t92636f7e727c0ea5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>The command goes through fine, but the next time I log into postgres using
the command,
>>psql mydb postgres
>>it logs in, and doesnt ask me for a password at all. If I issue a command
like,
This is because you have trust in pg_hba.conf file, change it to md5 so it
asks for password every time you log in :)
>>psql mydb postgres mypwd
That is not the correct way, just as i mentioned change it to md5 and now
when you do
psql -d mydb -U postgres
It will ask for a password.
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/8/07, George Heller <george(dot)heller(at)yahoo(dot)com> wrote:
>
> Hi all,
>
> I am using a postgres database, and want to set a password for the
> account. The default user name is 'postgres' and in order to set a password,
> I did an alter user as below,
>
> alter user postgres with password 'mypwd';
>
> The command goes through fine, but the next time I log into postgres using
> the command,
>
> psql mydb postgres
>
> it logs in, and doesnt ask me for a password at all. If I issue a command
> like,
>
> psql mydb postgres mypwd
>
> it says, extra argument!!! I have checked the pg_shadow table, and it
> looks like the password has been set. I also have a trust entry for the
> database server that I am accessing it through, in the pg_hba.conf file.
>
> Any suggestions to get around this problem?
>
> Thanks!
> George
>
> ------------------------------
> Need Mail bonding?
> Go to the Yahoo! Mail Q&A<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>for great
> tips from Yahoo! Answers<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>users.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Shoaib Mir | 2007-03-08 07:23:04 | Re: How to use pg_resetxlog if data directory is in c:/Program Files ? |
Previous Message | Steven De Vriendt | 2007-03-08 07:02:49 | How to use pg_resetxlog if data directory is in c:/Program Files ? |