November 29, 2017

PostgreSQL and the BSD authentication

If you are an OpenBSD user and you are using PostgreSQL, you can use the BSD authentication to login into PostgreSQL.
We will see how to do this.

Install PostgreSQL

On my OpenBSD system, i have got an user pea and doas is configured to allow me to do all the administrator’s things.

The setup is quite easy:

$ doas pkg_add postgresql-server
quirks-2.395 signed on 2017-11-27T16:02:16Z
postgresql-server-9.6.6:postgresql-client-9.6.6: ok
postgresql-server-9.6.6: ok
The following new rcscripts were installed: /etc/rc.d/postgresql
See rcctl(8) for details.
Look in /usr/local/share/doc/pkg-readmes for extra documentation.

If you re not an OpenBSD user, you should read the file /usr/local/share/doc/pkg-readmes/postgresql-server-9.6.6 to see all the options available.