Assuming that you did not provide a pgsql password via metadata during machine
creation you’re missing the password now.
Search the zoneinit log file for the PGSQL_PW value
(/var/svc/log/system-zoneinit:default.log) or recreate the zone with a password
in metadata set.
Here is an example:
```
{
"brand": "joyent",
"image_uuid": "2ca7cf08-7be3-11e4-9b45-1f6507130bb7",
"max_physical_memory": 256,
"internal_metadata": {
"pgsql_pw": "verysecure"
}
}
```
—
Daniel
—
Daniel
On Tue, Dec 30, 2014 at 9:14 PM, Ganapathy S A via smartos-discuss
<[email protected]> wrote:
> Running postgresql 14.3.0 instance under smartos-20141225T170427Z. Created
> a user for database purpose:
> *[root@psqlz ~]# useradd -c GanapathySA -d /home/ganu -m ganu[root@psqlz
> ~]# su - ganuganu@psqlz:~$ svcs | grep postgres *online
> 2:05:46 svc:/pkgsrc/postgresql:default
> Tried these but couldn't run psql successfully!
> *ganu@psqlz:~$ psql -U postgres *Password for user postgres:
> psql: FATAL: password authentication failed for user "postgres"
>
> *ganu@psqlz:~$ sudo psql -U postgres *Password:
> ganu is not in the sudoers file. This incident will be reported.
>
> */var/pgsql/data/pg_hba.conf*
> # TYPE DATABASE USER ADDRESS METHOD
> # "local" is for Unix domain socket connections only
> local all all password
> # IPv4 local connections:
> host all all 127.0.0.1/32 password
> # IPv6 local connections:
> host all all ::1/128 password
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> #local replication postgres password
> #host replication postgres 127.0.0.1/32 password
> #host replication postgres ::1/128 password
> host all all 192.168.1.102/32 password
> What am I missing here? Could someone please guide me in running psql
> without issues?
> Regards,
> Ganapathy
> -------------------------------------------
> smartos-discuss
> Archives: https://www.listbox.com/member/archive/184463/=now
> RSS Feed: https://www.listbox.com/member/archive/rss/184463/21955186-c7d24c67
> Modify Your Subscription: https://www.listbox.com/member/?&
> Powered by Listbox: http://www.listbox.com
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com