Re: FW: postgresql-8.3.6-1PGDG : password

From: "suresh adapa" <suresha(at)collab(dot)net>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>, <pgsql-bugs-owner(at)postgresql(dot)org>
Subject: Re: FW: postgresql-8.3.6-1PGDG : password
Date: 2009-11-11 09:32:07
Message-ID: 0213965108DEAD48960CE83455E07DFF02079E3E@maa-exchmb.maa.corp.collab.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

I am trying to find out limitation on what symbols can be used in
password option.

Example below attempts fail.

Does not allow to alter password if it starts with '!'
-----------------------------------------------------
-bash-3.2$ psql -Upostgres -q -c "alter user gopal with password '!123'"
-bash: !123: event not found

Allows us to alter password, but fails while authentication.
------------------------------------------------------------
-bash-3.2$ psql -Upostgres -q -c "alter user gopal with password '$123'"
-bash-3.2$ psql -h 127.0.0.1 -U gopal -d TEST3
Password for user gopal:
psql: FATAL: password authentication failed for user "gopal"
-bash-3.2$ psql -Upostgres -q -c "alter user gopal with password '$abc'"
-bash-3.2$ psql -h 127.0.0.1 -U gopal -d TEST3
Password for user gopal:
psql: FATAL: password authentication failed for user "gopal"

If we use/script tries to use environment variables like $PWD or $PATH.
It basically expands the ENV variable and its value is stored.
----------------------------------------------------------------------

-bash-3.2$ psql -Upostgres -q -c "alter user gopal with password '$PWD'"

-bash-3.2$ psql -h 127.0.0.1 -U gopal -d TEST3
Password for user gopal:$PWD
psql: FATAL: password authentication failed for user "gopal"

-bash-3.2$ psql -h 127.0.0.1 -U gopal -d TEST3
Password for user gopal:/var/lib/pgsql
Welcome to psql 8.3.6, the PostgreSQL interactive terminal.

Thanks
SureshA

-----Original Message-----
From: Heikki Linnakangas [mailto:heikki(dot)linnakangas(at)enterprisedb(dot)com]
Sent: Wednesday, November 11, 2009 2:46 PM
To: suresh adapa
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: FW: [BUGS] postgresql-8.3.6-1PGDG : password

suresh adapa wrote:
> I am basically testing few things as below for one off my Task
> requirement.
> Can you please check below Test Case 4,6 and 7 and comment.

I don't understand what you were trying to do and if you think there's
something wrong there..

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2009-11-11 10:20:50 Re: FW: postgresql-8.3.6-1PGDG : password
Previous Message Joe Marshal Mathew 2009-11-11 09:17:18 BUG #5179: Installation fails