Re: Creating New User?

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Creating New User?
Дата
Msg-id 200101131558.f0DFwKN00494@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Creating New User?  (Cam Turner <cam@we-create.com>)
Список 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  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.Elphick@lfix.co.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



В списке pgsql-novice по дате отправления:

Предыдущее
От: "rob"
Дата:
Сообщение: Re: Creating New User?
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: [BUGS] Bug in SQL functions that use a NULL parameter directly