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 DATABASE zab OWNER zab;

Looking for a better comment system?

You should try Remarkbox — a hosted comment service that embeds in your pages to keep the conversation in the same place as your content. It works everywhere, even static sites!

Remarks: Set postgres user password on PostgreSQL SmartOS Zone

© Russell Ballestrini.