Re: Creating New User?

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Cam Turner <cam(at)we-create(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Creating New User?
Date: 2001-01-13 15:58:18
Message-ID: 200101131558.f0DFwKN00494@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Cam Turner wrote:
><html>

Do send mail in ASCII, not html - it is SUCH a pain!

>Hi All,<br>
><br>
>Well the List archives search isn't returning results for me so I've got
>a quick question:<br>
><br>
>I've got pgsql installed on a debian linux&nbsp; system and I'm trying to
>add a user so that I can login with phpPgAdmin and begin playing with it.
>But phpPgAdmin keeps saying:<br>
><br>
>Warning: Unable to connect to PostgreSQL server: FATAL 1: SetUserId: user
>'password=' is not in 'pg_shadow' in /var/www/phpPgAdmin/lib.inc.php on
>line 130<br>

Note that it says "user 'password='". In other words, PHP is in a twist and
is sending the string 'password=' as the user name.

>Error - /var/www/phpPgAdmin/index.php<br>
>PostgreSQL said: Unable to connect to server<br>
><br>
>I turned off Advanced Auth in phpPgAdmin and logged in (as the postgres
>user?) I created a user and it seemed to work fine. When I output the
>contents of the pg_shadow file (via cat) it listed data that I had put
>in.<br>
><br>
>But I'm not able to log in as any of the users i create... I think I'm
>creating users incorrectly (passwords in pg_shadow are stored plain
>text). Help.<br>

The way to create users is with CREATE USER. If you've done that and can
connect as that user with psql, it has worked. It seems to me that your
problems are with PHP.

Passwords are indeed stored as plain text; but the password field is
not visible except to users with the privilege of creating users. However,
the password is exposed to packet snoopers, so it is probably a good idea
to use the crypt method rather than the password method in pg_hba.conf.
That encrypts the password during its passage across the network.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Wherefore let him that thinketh he standeth take heed
lest he fall." I Corinthians 10:12

Browse pgsql-novice by date

  From Date Subject
Next Message Jonathan Chum 2001-01-14 08:40:56 Two novice questions
Previous Message rob 2001-01-13 14:27:13 Re: Creating New User?