
How it works…
As changing the password is just an SQL statement, any interface can do this. Other tools also allow this, such as the following:
- pgAdmin4
- phpPgAdmin
If you don't use one of the main routes to change the password, you can still do it yourself, using SQL from any interface. Note that you need to encrypt your password, because if you do submit a password in plain text, like the following, then it will be shipped to the server in plain text:
ALTER USER myuser PASSWORD 'secret'
Luckily, the password in this case will still be stored in an encrypted form. It will also be recorded in plain text in psql's history file, as well as in any server and application logs, depending on the actual log-level settings.
PostgreSQL doesn't enforce a password change cycle, so you may wish to use more advanced authentication mechanisms, such as GSSAPI, SSPI, LDAP, RADIUS, and so on.