From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: hans.wolters <hans.wolters@protonmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: password saved in .psql_history
Date: Tue, 25 Aug 2020 17:39:46 -0400
Message-ID: <20200825213946.GA22117@alvherre.pgsql> (raw)
In-Reply-To: <K9Qpnt34zosrh-Ihn8gvA90qoOhDWIb_XcC3i1_FE0dZ2mKiC9hfhtyRJZWzr7EJzHAKy9dqhXNJiyoZxDS2moNCL3PzU018V7jeTPG_1Bg=@protonmail.com>
On 2020-Aug-25, hans.wolters wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Dear all,
> I noticed the password of a used is stored in the history of the psql user (postgres in my case). This happens when alter user <user> with password '<password>' is used.
> I suppose it is not a real bug but it might be handy to filter that for things like a history listing.
This is why you should use \password in psql instead of 'alter user ..
password'. (Well, that and the server log and risk of unencrypted
password traffic.)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, hans.wolters@protonmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: password saved in .psql_history
In-Reply-To: <20200825213946.GA22117@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox