Thread: Creating New User?

Creating New User?

From
Cam Turner
Date:
Hi All,

Well the List archives search isn't returning results for me so I've got
a quick question:

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:

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
Error - /var/www/phpPgAdmin/index.php
PostgreSQL said: Unable to connect to server

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.

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.

Thanks in advance,

Cam




Cameron Turner, Developer & Systems
Support
We-Create Inc
Internet & Multimedia

Cell:
519.897.4409
Office: 519.745.7374
Fax: 519.745.9963
Toll Free: 888.615.7374
Web: www.we-create.com

ECPGconnect Error

From
Rudy
Date:
I am getting the following error when I try to run a 'C' function from
Postgresql.

/usr/local/pgsql/programs/testdelim.so failed: undefined symbol:
ECPGconnect

The line form the testdelim.c is as follows: (i insert 'user' and
'password')
{ ECPGconnect(__LINE__, "cuervo" , "user" , "password" , NULL, 0);}
This obviously works b/c is works from the OS.

All the compiles work fine. I am able to run the exec file from the OS
prompt. The CREATE FUNCTION works fine. The problem occurs when I try to
select from the function.

cuervo=# CREATE FUNCTION testdelim(VARCHAR,VARCHAR)
cuervo-# RETURNS VARCHAR
cuervo-# AS '/usr/local/pgsql/programs/testdelim.so'
cuervo-# LANGUAGE 'C';

Anyone run into this? Able help greatly appreciated.

Rudy Laczkovich



Re: Creating New User?

From
"rob"
Date:
I'm not positive, but the problem appears to be phpPgAdmin or it's configuration. 'password=' is almost certainly  not a valid username.  Perhaps you just need to review the config file(s)?  Have you tried logging in on the local database machine with psql? 
 
--rob
----- Original Message -----
Sent: Friday, January 12, 2001 5:09 PM
Subject: Creating New User?

Hi All,

Well the List archives search isn't returning results for me so I've got a quick question:

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:

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
Error - /var/www/phpPgAdmin/index.php
PostgreSQL said: Unable to connect to server

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.

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.

Thanks in advance,

Cam



Cameron Turner, Developer & Systems Support
We-Create Inc
Internet & Multimedia

Cell: 519.897.4409
Office: 519.745.7374
Fax: 519.745.9963
Toll Free: 888.615.7374
Web: www.we-create.com

Re: Creating New User?

From
"Oliver Elphick"
Date:
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