Random   •   Archives   •   RSS   •   About   •   Contact

Set postgres user password on PostgreSQL SmartOS Zone

Connect to zone and determine the auto generated password for postgres user:

cat /var/svc/log/system-zoneinit\:default.log | grep PGSQL_PW

document the result and log into postgres with the following command, entering the password when prompted:

[root@psql ~]# psql --user postgres

Alter the postgres role's password:

postgres=# ALTER ROLE postgres UNENCRYPTED PASSWORD 'new-password';

Now exit (\q) then try to log in with the new password.

In my case I was setting up PostgreSQL for testing out Zabbix monitoring system. So I did the following as the postgres user:

postgres=# CREATE USER zab UNENCRYPTED PASSWORD 'zabby'
postgres=# CREATE DATABASE zab OWNER zab;



Want comments on your site?

Remarkbox — is a free SaaS comment service which embeds into your pages to keep the conversation in the same place as your content. It works everywhere, even static HTML sites like this one!

uncloseai.js example for static sites


Remarks: Set postgres user password on PostgreSQL SmartOS Zone

© Russell Ballestrini.