postgresqluser-accountssuse

how to add 'postgres' - operating system user account? (Installation by source - suse 15.3/ postgres 15.2)


I'm on my way installing postgres 15.2 under Suse Linux Enterprise 15.3 by source, following the instructions from www.postgresql.org:

I'm stuck at chapter "19.2. Creating Database Cluster" (https://www.postgresql.org/docs/current/postgres-user.html)

root# mkdir /usr/local/pgsql
root# chown postgres /usr/local/pgsql
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data

The postgres User (I'm looking for operating system user account") does not exist yet.

My question: how can I add the new postgres- system operation user account (with right permissions for postgreSQL)?


Solution

  • The page postgres-user.html mentions the required commands (useradd or adduser). Run useradd --help to see available options. They are also all mentioned in the referenced man page.

    Maybe you are just confused by the text following Depending on the command line options. No home directory will be created unless -m is specified.

    I think you are all set by just running useradd postgres.