Foreman 1.6 Installation - Could not find user postgres

Hi,

I am trying to install Foreman. It complains that

/Stage[main]/Postgresql::Server::Initdb/File[/var/lib/pgsql/data]/owner:
change from 26 to postgres failed: Could not find user postgres

Do I need to create this user by myself? I thought the Foreman installer
will create it?

Thanks!

Usually it'd be created by your OS PostgreSQL packages, assuming they
installed correctly before this error.

e.g. if you're using an RPM based OS, see "rpm -q --scripts
postgresql-server" which on EL7 contains:

/usr/sbin/groupadd -g 26 -o -r postgres
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash
-c "PostgreSQL Server" -u 26 postgres

Try running those by hand and see if they work.

··· On 25/09/14 18:17, staceytian4321@gmail.com wrote: > Hi, > > > I am trying to install Foreman. It complains that > > > /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/pgsql/data]/owner: change > from 26 to postgres failed: Could not find user postgres > > > > Do I need to create this user by myself? I thought the Foreman installer > will create it?


Dominic Cleal
Red Hat Engineering

Before I run foreman installer, I don't already have Postgre SQL server
installed on my Linux host.

rpm -qa|grep postgresql :

postgresql-libs-8.4.20-1.el6_5.x86_64
postgresql-jdbc-8.4.701-8.el6.noarch
postgresql-devel-8.4.20-1.el6_5.x86_64
postgresql-libs-8.4.20-1.el6_5.i686
postgresql-8.4.20-1.el6_5.x86_64

After I run foreman installer, it installs postgre sql server:
foreman-postgresql-1.6.0-1.el6.noarch
postgresql-server-8.4.20-1.el6_5.x86_64

I guess anyway next time I will try to run your command to add postgres
user and group first, then run foreman installer. Anyway it won't hurt.

Thanks!

··· On Friday, September 26, 2014 6:55:14 AM UTC-4, Dominic Cleal wrote: > > On 25/09/14 18:17, staceyt...@gmail.com wrote: > > Hi, > > > > > > I am trying to install Foreman. It complains that > > > > > > > /Stage[main]/Postgresql::Server::Initdb/File[/var/lib/pgsql/data]/owner: > change > > from 26 to postgres failed: Could not find user postgres > > > > > > > > Do I need to create this user by myself? I thought the Foreman installer > > will create it? > > Usually it'd be created by your OS PostgreSQL packages, assuming they > installed correctly before this error. > > e.g. if you're using an RPM based OS, see "rpm -q --scripts > postgresql-server" which on EL7 contains: > > /usr/sbin/groupadd -g 26 -o -r postgres > /usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash > -c "PostgreSQL Server" -u 26 postgres > > Try running those by hand and see if they work. > > -- > Dominic Cleal > Red Hat Engineering >