pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
I can't connect to phpPgAdmin
7+ messages / 4 participants
[nested] [flat]

* I can't connect to phpPgAdmin
@ 2003-03-21 02:43  Devi Munandar <devi@informatika.lipi.go.id>
  0 siblings, 0 replies; 7+ messages in thread

From: Devi Munandar @ 2003-03-21 02:43 UTC (permalink / raw)
  To: pgsql-admin

Hi Admin

I have Installed Postgresql 7.2 for linux redhat 8.0 and i try to connect to
postgresql pass through phpPgAdmin 2.4 but i can't because i get message
'Wrong username/password. Access denied', so how can i pass through to
phpPgAdmin?, should i edit pg_hba.conf ?, are there default username and
password to pass through phpPgAdmin?


regards,

devi munandar




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* I can't connect to phpPgAdmin
@ 2003-03-21 03:04  Devi Munandar <devi@informatika.lipi.go.id>
  0 siblings, 1 reply; 7+ messages in thread

From: Devi Munandar @ 2003-03-21 03:04 UTC (permalink / raw)
  To: pgsql-admin

Hi Admin

I have Installed Postgresql 7.2 for linux redhat 8.0 and i try to connect to
postgresql pass through phpPgAdmin 2.4 but i can't because i get message
'Wrong username/password. Access denied', so how can i pass through to
phpPgAdmin?, should i edit pg_hba.conf ?, are there default username and
password to pass through phpPgAdmin?


regards,

devi munandar





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: I can't connect to phpPgAdmin
@ 2003-03-21 09:52  aris_it@csahome.com
  0 siblings, 1 reply; 7+ messages in thread

From: aris_it@csahome.com @ 2003-03-21 09:52 UTC (permalink / raw)
  To: devi@informatika.lipi.go.id; pgsql-admin

Can you give some more information about your pg_hba.conf and your 
postgresql.conf. First  try with user=root and password=      
and if it doesn't work please check your postgresql.conf and make sure the 
tcpip socket =true. And check also your pg_hba.conf and make sure your ip
or 
your network in there. I mean if you use phpPgAdmin in the different
machine. 
 

Type  database        user    ip address      ip-mask         methode
loca    all                     all     192.168.0.0   255.255.255.0    
trust 

make sure -h options works too.....
it-psql# psql -h192.168.0.1 -Upostgres template1

if -h option works your server works also with tcp/ip protocol to connect 
with client. 

Best reagards

Aris Wendy



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: I can't connect to phpPgAdmin
@ 2003-03-21 16:28  aris <aris_postgre@telkom.net>
  parent: Devi Munandar <devi@informatika.lipi.go.id>
  0 siblings, 0 replies; 7+ messages in thread

From: aris @ 2003-03-21 16:28 UTC (permalink / raw)
  To: Devi Munandar <devi@informatika.lipi.go.id>; pgsql-admin

On Thursday 20 March 2003 20:04, Devi Munandar wrote:
> Hi Admin
>
> I have Installed Postgresql 7.2 for linux redhat 8.0 and i try to connect
> to postgresql pass through phpPgAdmin 2.4 but i can't because i get message
> 'Wrong username/password. Access denied', so how can i pass through to
> phpPgAdmin?, should i edit pg_hba.conf ?, are there default username and
> password to pass through phpPgAdmin?
>
>
> regards,
>
> devi munandar

Can you give some more information about your pg_hba.conf and your 
postgresql.conf. First  try with user=root and password=      
and if it doesn't work please check your postgresql.conf and make sure the 
tcpip socket =true. And check also your pg_hba.conf and make sure your ip or 
your network in there. I mean if you use phpPgAdmin in the different machine. 
 

Type  database        user    ip address      i     p-mask         methode
loca    all                 all     192.168.0.0       255.255.255.0     trust 

make sure -h options works too.....
it-psql# psql -h192.168.0.1 -Upostgres template1

if -h option works your server works also with tcp/ip protocol to connect 
with client. 

Best reagards

Aris Wendy
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: I can't connect to phpPgAdmin
@ 2003-03-22 06:53  Devi Munandar <devi@informatika.lipi.go.id>
  parent: aris_it@csahome.com
  0 siblings, 1 reply; 7+ messages in thread

From: Devi Munandar @ 2003-03-22 06:53 UTC (permalink / raw)
  To: aris_it@csahome.com; +Cc: pgsql-admin


Than'k Mr.Aris

I''ve tried to set up pg_hba.conf and postgres.conf, and then execution
>psql -h 167.205.240.67 -- that is my IP Address server-- but still get
problem and gei message "could not connect  to server : connection refuse,
is the server running on 167.205.240.67 and accepting TCP/IP connections on
port 5432", so what can i do?

pg_hba.conf
********************
.................
..................
TYPE        DATABASE     USER      IP_ADRESS             MASK
AUTH_TYPE
local          all                        all            167.205.240.67
255.255.255.0        trust
...................
.................

postgesql.conf
*********************
..........
............
.........
##connections parameter
tcpip_socket=true
max_connection = 32
ssl=true
port=5432
hostname_lookup=false
show_source_port=false
................
............

config.inc.php in phpPgAdmin
************************
/* $Id: config.inc.php-dist,v 1.10 2002/06/04 18:24:50 killroyboy Exp $ */

// Set the name and version
$cfgProgName  = "phpPgAdmin";
$cfgVersion  = "2.4.2";

// The default database is used to connect to the database to check the
adv_auth
// This can actually be any database you currently have on your system.  It
just
// needs _a_ database to connect and check the system tables.
$cfgDefaultDB = "template1";

// You should change the superuser if different from postgres
// This is just used to filter out the system functions when listing
$cfgSuperUser = "postgres";

// If you want to be able to view the contents and structure of the System
Catalog/Tables set this to true.
// If you are new to Postgres or are not familiar with the system tables, it
is suggested you leave this as false
$cfgSysTables  = true;

// If you want the web interface to administer postgres user, set this as
true.
$cfgUserAdmin  = true;

// If you want to enable reporting
$cfgReports  = true;

// If you want to filter the databases to only the ones the user has created
or owns.
// This has no affect if the user is a superuser.
$cfgUserDatabases = true;

//  Set this to true during development of phpPgAdmin
$cfgDebug  = false;

// If you do NOT want to quote all relations, set this to false
$cfgQuotes  = true;

// Maximum pages to display link in browse
$cfgMaxPages = 9;

// If you do not want to display the tables of a database in the left frame,
add it to this array
// This feature is very useful when you have a database that has many tables
and slowes down the load of the left frame.
// $cfgNoTables[] = "big_table";

/******************************** IMPORTANT SECURITY NOTICE
********************************
 By default, Postgres does not check passwords through a local connection.
This is
 a major security if connecting through a local unix socket with phpPgAdmin.
You
 have a few options to close this security hole:
 1. You can connect through a TCP connection (use the -i option to start
postgres)
  - Set $cfgServers[*]['local'] = false;
  - Edit your $PGDATA/pg_hba.conf file to accept connections from localhost
   with password authentication
 2. Edit your $PGDATA/pg_hba.conf file to use password authentication
through a
  local connection.
********************************* IMPORTANT SECURITY NOTICE
*******************************/


// The $cfgServers array starts with $cfgServers[1].  Do not use
$cfgServers[0].
// You can disable a server config entry by setting host to ''.
$cfgServers[1]['local']  = false;
$cfgServers[1]['host']  = 'localhost';
$cfgServers[1]['port']  = '5432';
$cfgServers[1]['adv_auth']  = true;

$cfgServers[1]['user']   = ''; // if you are not using adv_auth, enter the
username to connect all the time
$cfgServers[1]['password']  = ''; // if you are not using adv_auth and a
password is required enter a password
$cfgServers[1]['only_db']  = ''; // if set to a db-name, only this db is
accessible

$cfgServers[2]['local']  = false;
$cfgServers[2]['host']   = '';
$cfgServers[2]['port']   = '5432';
$cfgServers[2]['adv_auth']  = true;

$cfgServers[2]['user']   = ''; // if you are not using adv_auth, enter the
username to connect all the time
$cfgServers[2]['password']  = ''; // if you are not using adv_auth and a
password is required enter a password
$cfgServers[2]['only_db']  = ''; // if set to a db-name, only this db is
accessible

$cfgServers[3]['local']  = false;
$cfgServers[3]['host']   = '';
$cfgServers[3]['port']   = '5432';
$cfgServers[3]['adv_auth']  = true;

$cfgServers[3]['user']   = ''; // if you are not using adv_auth, enter the
username to connect all the time
$cfgServers[3]['password']  = ''; // if you are not using adv_auth and a
password is required enter a password
$cfgServers[3]['only_db']  = ''; // if set to a db-name, only this db is
accessible

// If you have more than one server configured, you can set
$cfgServerDefault
// to any one of them to autoconnect to that server when phpPGAdmin is
started,
// or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfgServerDefault *MUST* be
// set to that server.
$cfgServerDefault   = 1; // default server  (0 = no default server)
$cfgServer    = ''; // the selected server is copied here for easier access
unset($cfgServers[0]);  // Since 0 = no server, $cfgServers[0] must not be
used

$cfgManualBase    = "http://www.postgresql.org/idocs/index.php";;

$cfgConfirm    = true;
$cfgPersistentConnections  = false;

// If you have a table with several thousands of records, you will want to
set this false.
$cfgCountRecs   = true;

// If you want the fields alphabetized when inserting/editing
$cfgDoOrder   = false;

$cfgBorder         = "0";
$cfgThBgcolor    = "#D3DCE3";
$cfgBgcolorOne    = "#CCCCCC";
$cfgBgcolorTwo    = "#DDDDDD";
$cfgMaxRows     = 30;
$cfgMaxInputsize   = "300px";
$cfgMaxTextAreaSize   = "400px";
$cfgOrder     = "ASC";

$cfgShowBlob    = false;
$cfgShowSQL     = true;

// Set the maximum characters in any given field to diplay in "browse"
mode - 0 is unlimited
$cfgMaxText     = 255;

$cfgMember         = "#CCCCFF";
$cfgNonMember       = "#CCCC99";
$cfgMaxTries        = 10;

// Set your language preferences here.
include("english.inc.php");

?>


best regards,

--devi munandar




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: I can't connect to phpPgAdmin
@ 2003-03-22 15:49  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Devi Munandar <devi@informatika.lipi.go.id>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2003-03-22 15:49 UTC (permalink / raw)
  To: Devi Munandar <devi@informatika.lipi.go.id>; +Cc: aris_it@csahome.com; pgsql-admin

"Devi Munandar" <devi@informatika.lipi.go.id> writes:
> I''ve tried to set up pg_hba.conf and postgres.conf, and then execution
>> psql -h 167.205.240.67 -- that is my IP Address server-- but still get
> problem and gei message "could not connect  to server : connection refuse,
> is the server running on 167.205.240.67 and accepting TCP/IP connections on
> port 5432", so what can i do?

If you're seeing "connection refused" then the connection attempt is
never reaching the postmaster at all.  It's not clear from what you
say above that you've actually started the postmaster.  If you did start
the postmaster, perhaps you have packet filtering turned on that
prevents connections to port 5432?  (The default configuration in recent
Red Hat releases will filter such connections, for example.)

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: I can't connect to phpPgAdmin
@ 2003-03-24 06:28  aris_it@csahome.com
  0 siblings, 0 replies; 7+ messages in thread

From: aris_it@csahome.com @ 2003-03-24 06:28 UTC (permalink / raw)
  To: devi@informatika.lipi.go.id; +Cc: pgsql-admin


Ok....Let's start from begin
1. Please check your port status in your server with familiar tools like
nmap. And make sure 
there is a port for postrgresql (5432). 

aris-deb:~# nmap 192.168.0.2

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
Interesting ports on  (192.168.0.2):
(The 1547 ports scanned but not shown below are in state: closed)
Port       State       Service
9/tcp      open        discard
13/tcp     open        daytime
21/tcp     open        ftp
23/tcp     open        telnet
25/tcp     open        smtp
37/tcp     open        time
5432/tcp   open        postgres


Nmap run completed -- 1 IP address (1 host up) scanned in 3 seconds

2. If there is no postgresql port (5432) please check your packet filtering
(ipchains or iptables) 
and allow for it.

3. For pg_hba.conf
TYPE      DATABASE     USER     IP_ADRESS    MASK    AUTH_TYPE
local        all                    all     167.205.240.67 255.255.255.0
trust

if yur configuration like this you just allow for IP 167.205.240.67/24 to
acces this server. 
Can you change it to 167.205.240.0 to allow your network for accesing your
server. 

Best regards 

Aris Wendy




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2003-03-24 06:28 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 02:43 I can't connect to phpPgAdmin Devi Munandar <devi@informatika.lipi.go.id>
2003-03-21 03:04 I can't connect to phpPgAdmin Devi Munandar <devi@informatika.lipi.go.id>
2003-03-21 16:28 ` aris <aris_postgre@telkom.net>
2003-03-21 09:52 Re: I can't connect to phpPgAdmin aris_it@csahome.com
2003-03-22 06:53 ` Devi Munandar <devi@informatika.lipi.go.id>
2003-03-22 15:49   ` Tom Lane <tgl@sss.pgh.pa.us>
2003-03-24 06:28 Re: I can't connect to phpPgAdmin aris_it@csahome.com

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox