Change user password

Lists: pgsql-admin
From: "Dan Scott" <danieljamesscott(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Change user password
Date: 2008-12-05 15:42:28
Message-ID: 6835906b0812050742t279c9f04r18218cff3d79eb78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi,

Is is possible to modify a user password using a command line script?
I know about the ALTER USER command from within the client, but this
looks like it's quite insecure, storing the password in the history. I
know it's possible to insert the encrypted password with ALTER USER
but that means generating the hash elsewhere. A simple 'alteruser -P
username' which then prompts for the user password would be nice. Does
this exist?

Thanks,

Dan Scott


From: Quan Zongliang <quanzongliang(at)gmail(dot)com>
To: "Dan Scott" <danieljamesscott(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Change user password
Date: 2008-12-10 04:34:19
Message-ID: 20081210132824.16A4.4125B4E5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi, Scott

It seems no such command exists.

-----------------------------------------------
Quan Zongliang
quanzongliang(at)gmail(dot)com
CIT Japan: http://www.cit.co.jp
CIT China: http://www.citbj.com.cn


From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Dan Scott" <danieljamesscott(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Change user password
Date: 2008-12-10 04:43:11
Message-ID: dcc563d10812092043o48465a6bj1ce16182c3dda7ca@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

On Fri, Dec 5, 2008 at 8:42 AM, Dan Scott <danieljamesscott(at)gmail(dot)com> wrote:
> Hi,
>
> Is is possible to modify a user password using a command line script?
> I know about the ALTER USER command from within the client, but this
> looks like it's quite insecure, storing the password in the history. I
> know it's possible to insert the encrypted password with ALTER USER
> but that means generating the hash elsewhere. A simple 'alteruser -P
> username' which then prompts for the user password would be nice. Does
> this exist?

\password from the psql prompt does that.