Thread: Cannot create users

Cannot create users

From
Rich Shepard
Date:
  Perhaps I didn't get an answer to this question because I posted it
originally late last Friday, and it got lost over the weekend. So, I will
try again this Monday morning. :-)

  I did a completely new installation of 7.0.3 via rpm. When I su'd to
'postgres' and tried to create another user (me) this is what I saw:

[postgres@salmo rshepard]$ createuser rshepard
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
psql: Missing or erroneous pg_hba.conf file, see postmaster log for details
createuser: creation of user "rshepard" failed

  Will someone please explain to me what I missed during the installation? I
know it must be something simple, but I don't see the answer in the
administrator's manual. (If the answer is there, please pass me a pointer to
the page number and I'll go read it for myself.)

Thanks,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com


Re: Cannot create users

From
"Richard Huxton"
Date:
----- Original Message -----
> [postgres@salmo rshepard]$ createuser rshepard
> Shall the new user be allowed to create databases? (y/n) y
> Shall the new user be allowed to create more new users? (y/n) y
> psql: Missing or erroneous pg_hba.conf file, see postmaster log for
details
> createuser: creation of user "rshepard" failed
>
>   Will someone please explain to me what I missed during the installation?
I
> know it must be something simple, but I don't see the answer in the
> administrator's manual. (If the answer is there, please pass me a pointer
to
> the page number and I'll go read it for myself.)

pg_hba.conf is postgres' host access file (bit like /etc/hosts.allow).
You'll probably find it somewhere under your main pgsql directory or /etc
(on this machine it is in /usr/local/pgsql/data). It lists which hosts can
connect to the database backend, so it could well be that the host you are
using is not listed there (the file contains instructions).

If you cannot find the file, get a copy from the source tar (and drop the
rpm maintainer a note to let them know there's a problem).

- Richard Huxton


Re: Cannot create users

From
Rich Shepard
Date:
On Mon, 20 Nov 2000, Richard Huxton wrote:

> pg_hba.conf is postgres' host access file (bit like /etc/hosts.allow).

Richard,

  Understood. Problem solved by using the Microsoft solution: rebooting the
server. This morning, WordPerfect decided to not recognize the laser
printer; worked perfectly last night. I couldn't find anything wrong, except
with WP. So, I finally decided to do a 'shutdown -r' (after an uptime of 50
days). Well, ...! That cleared up the WP printing problem and the postgres
createuser problem. After the reboot (and manually starting postgresql),
pg_hba.conf appeared in /var/lib/pgsql/data! Wasn't there before.

  Sigh. It's definitely been one of _those_ Mondays!

  Still can't find the log file, however. Where is it supposed to live?

Thanks,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com


Re: Cannot create users

From
Lamar Owen
Date:
Rich Shepard wrote:
> createuser problem. After the reboot (and manually starting postgresql),
> pg_hba.conf appeared in /var/lib/pgsql/data! Wasn't there before.

Now _that_ is strange....

>   Still can't find the log file, however. Where is it supposed to live?

You will have to enable syslog manually.  First, set pg_options to use
syslog (see the pg_options documentation in the main PostgreSQL docs),
then set /etc/syslog.conf to point the resulting output to
/var/log/postgresql (see my earlier post about that....).

Syslog is currently not automatically enabled -- as soon as I figure out
how to go about dynamically editing /etc/syslog.conf in a safe and sane
manner during package installation we can go there -- although, the
facility is currently hardcoded to local0.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Cannot create users

From
Rich Shepard
Date:
On Mon, 20 Nov 2000, Lamar Owen wrote:

> Now _that_ is strange....

  As I wrote, Lamar, it's been one of _those_ days.

> You will have to enable syslog manually.  First, set pg_options to use
> syslog (see the pg_options documentation in the main PostgreSQL docs),
> then set /etc/syslog.conf to point the resulting output to
> /var/log/postgresql (see my earlier post about that....).

  Will do so later today -- after the current half-dozen crises are handled.
Didn't keep the earlier post, so I'll have to feel my way along.

Thanks,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com