pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedpgaccess on win95 connection
6+ messages / 4 participants
[nested] [flat]
* pgaccess on win95 connection
@ 1999-11-29 10:59 Bill Barnes <bbarnes@operamail.com>
1999-11-29 16:19 ` Re: [INTERFACES] pgaccess on win95 connection Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
1999-11-29 16:34 ` Re: [INTERFACES] pgaccess on win95 connection Lamar Owen <lamar.owen@wgcr.org>
0 siblings, 2 replies; 6+ messages in thread
From: bbarnes@operamail.com @ 1999-11-29 10:59 UTC (permalink / raw)
To: pgsql-interfaces
Installed the rpm of 6.5.3 seemingly with success. Can access template1 with pgsql and pgaccess on a Mandrake 6.1
machine.
"ps ax | grep postmaster" reports the following:
551 ? S 0:00 /usr/bin/postmaster -i -S -D/var/lib/pgsql
1932 pts/1 S 0:00 grep postmaster
'1932' increments by 2 on each iteration of the ps command. Don't know enough about what I am doing to interpret
this, but in executing pgaccess on the windows machine I get the following:
the connection window displays localhost
5432
I entered template1
postgres
<password>
The connect error message is
Error trying to connect database "template1" on host localhost
PostgreSQL error message: Connection to database failed
connectDB() failed: Is the postmaster running and accepting TCP/IP(with -i) connections
at 'localhost' on port '5432'?
Tried changing the port number. It looks at least like we are getting to the database. How do I ping the server?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] pgaccess on win95 connection
1999-11-29 10:59 pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
@ 1999-11-29 16:19 ` Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
1 sibling, 0 replies; 6+ messages in thread
From: Ross J. Reedstrom @ 1999-11-29 16:19 UTC (permalink / raw)
To: Bill Barnes <bbarnes@operamail.com>; +Cc: pgsql-interfaces
Hi Bill!
Welcome to the PostgreSQL world.
On Mon, Nov 29, 1999 at 10:59:48AM +0000, Bill Barnes wrote:
> Installed the rpm of 6.5.3 seemingly with success. Can access template1
> with pgsql and pgaccess on a Mandrake 6.1 machine. "ps ax | grep
> postmaster" reports the following:
> 551 ? S 0:00 /usr/bin/postmaster -i
> -S -D/var/lib/pgsql
> 1932 pts/1 S 0:00 grep postmaster
> '1932' increments by 2 on each iteration of the ps command. Don't
Hmm, seems you're a bit new to unix as well, eh? Don't worry about this,
it's just finding the process that's running the 'grep' command you typed.
> know enough about what I am doing to interpret this, but in executing
> pgaccess on the windows machine I get the following:
Windows, eh? So this is a different machine on the network.
>
> the connection window displays localhost
> 5432
> I entered template1
> postgres
> <password>
> The connect error message is
> Error trying to connect database "template1" on host localhost
>
> PostgreSQL error message: Connection to database failed
> connectDB() failed: Is the postmaster running and accepting TCP/IP(with -i) connections
> at 'localhost' on port '5432'?
>
Right, because the machine postmaster is running on is _not_ localhost, but
rather the Linux box you mentioned up top. Replace 'localhost' with the
DNS name of that computer. Ah, back on the linux box, make sure you edit
pg_hba.conf to allow access from the Windows machine. You'll need to know
it's IP number. BTW, the 'ps' output above is useful to see that you _do_
have network access turned on for postgresql (the -i switch).
> Tried changing the port number. It looks at least like we are getting to the database. How do I ping the server?
Nope, you're never leaving the windows machine. As to ping, umm, did you try
'ping db_server.name'? ;-) But you won't need to, if you can get to the linux
box over the network at all, like with telnet. Puting the right hostname in,
and allowing access via the pg_hba.conf file (I'm not sure where the Mandrake
install puts it, sorry.) should fix you right up.
Hope this helps,
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] pgaccess on win95 connection
1999-11-29 10:59 pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
@ 1999-11-29 16:34 ` Lamar Owen <lamar.owen@wgcr.org>
1 sibling, 0 replies; 6+ messages in thread
From: Lamar Owen @ 1999-11-29 16:34 UTC (permalink / raw)
To: Bill Barnes <bbarnes@operamail.com>; +Cc: pgsql-interfaces
Bill Barnes wrote:
>
> Installed the rpm of 6.5.3 seemingly with success. Can access template1 with pgsql and pgaccess on a Mandrake 6.1
> machine.
> "ps ax | grep postmaster" reports the following:
> 551 ? S 0:00 /usr/bin/postmaster -i -S -D/var/lib/pgsql
> 1932 pts/1 S 0:00 grep postmaster
>
> '1932' increments by 2 on each iteration of the ps command. Don't know enough about what I am doing to interpret
The numbers 551 and 1932 are the process identifiers for the two
processes the grep found. So postmaster is running. To determine which
port number postmaster has attached to, run 'netstat -ae |grep postgres'
-- this will show all ports on the machine that the user postgres has
attached, and postmaster is one of them. Or, you can do a 'ls -al /tmp
|grep .s.PGSQL' -- the number you see after the '.s.PGSQL' is the port
number.
[snip]
> this, but in executing pgaccess on the windows machine I get the following:
Ok. It looks to me like you are trying to do the following:
You have a Mandrake 6.1 machine on your LAN running PostgreSQL. You
further have a Windows machine on your LAN, from which you want to
connect to PostgreSQL running on the Mandrake 6.1 machine.
To do this:
1.) In the pgaccess connection box, you will need to enter the hostname
or IP address of the server machine, not 'localhost'.
2.) On the server machine, in the file '/var/lib/pgsql/pg_hba.conf', you
will need to add a line allowing access to the database from the IP
address or hostname of the Windows machine. If I remember correctly, you
can cause the postmaster to reread the pg_hba.conf file with a SIGHUP
sent to the postmaster process -- however, since it is apparent that you
are not very familiar with Unix-like systems, I recommend that you
restart the postmaster by executing, as root,
'/etc/rc.d/init.d/postgresql restart' -- this will completely restart
the postmaster.
Now try the connect again.
You can test whether the server is up or not by, in Windows, going to a
DOS prompt and executing 'ping' with the server's IP address.
You will also need to get a book on Unix administration; the O'Reilly
classic 'Essential System Administration' is a good start (www.ora.com).
Administering the PostgreSQL database requires a good knowledge of basic
system administration procedures -- and this O'Reilly book is one of the
best introductory sysadmin books you will find. I also recommend
reading Bruce's book when it is complete -- the current draft is
available on the www.postgresql.org site.
And there's always the PostgreSQL documentation, which is installed by
default in the RPM installation in the directory
'/usr/doc/postgresql-6.5.3' -- since you are using Mandrake 6.1, just
point kfm over there, and browse around -- there is a complete copy of
the documentation there.
Hope that helps.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [INTERFACES] pgaccess on win95 connection
@ 1999-11-30 00:30 Bill Barnes <bbarnes@operamail.com>
1999-11-30 00:58 ` Re: [INTERFACES] pgaccess on win95 connection Lamar Owen <lamar.owen@wgcr.org>
1999-11-30 01:21 ` RE: [INTERFACES] pgaccess on win95 connection eem21@cam.ac.uk
0 siblings, 2 replies; 6+ messages in thread
From: Bill Barnes @ 1999-11-30 00:30 UTC (permalink / raw)
To: Lamar Owen <lamar.owen@wgcr.org>; +Cc: pgsql-interfaces
>
>Ok. It looks to me like you are trying to do the following:
>
>You have a Mandrake 6.1 machine on your LAN running PostgreSQL. You
>further have a Windows machine on your LAN, from which you want to
>connect to PostgreSQL running on the Mandrake 6.1 machine.
>
>To do this:
>1.) In the pgaccess connection box, you will need to enter the hostname
>or IP address of the server machine, not 'localhost'.
>
>2.) On the server machine, in the file '/var/lib/pgsql/pg_hba.conf', you
>will need to add a line allowing access to the database from the IP
>address or hostname of the Windows machine. If I remember correctly, you
>can cause the postmaster to reread the pg_hba.conf file with a SIGHUP
>sent to the postmaster process -- however, since it is apparent that you
>are not very familiar with Unix-like systems, I recommend that you
>restart the postmaster by executing, as root,
>'/etc/rc.d/init.d/postgresql restart' -- this will completely restart
>the postmaster.
Found in this file 2 lines:
'local all
trust'
'host all 127.0.0.1 255.255.255.255.
trust'
While this is not the ultimate security :-) doesn't it render the host
accessible.
The problem may be in Windows.
'ping' reports the target machine unreachable.
Tried to ping my ISP and get the same response.
Looks like I've got to do something here before I can go any farther.
>Now try the connect again.
>
>You can test whether the server is up or not by, in Windows, going to a
>DOS prompt and executing 'ping' with the server's IP address.
>
>You will also need to get a book on Unix administration; the O'Reilly
>classic 'Essential System Administration' is a good start (www.ora.com).
>Administering the PostgreSQL database requires a good knowledge of basic
>system administration procedures -- and this O'Reilly book is one of the
>best introductory sysadmin books you will find. I also recommend
>reading Bruce's book when it is complete -- the current draft is
>available on the www.postgresql.org site.
>
>And there's always the PostgreSQL documentation, which is installed by
>default in the RPM installation in the directory
>'/usr/doc/postgresql-6.5.3' -- since you are using Mandrake 6.1, just
>point kfm over there, and browse around -- there is a complete copy of
>the documentation there.
>
>Hope that helps.
Thanks. I will look for these. And resurrect my Windows manuals.
Started this effort with what I thought was lots of lead time. But you know
what a Linux adventure is like. Consequently, I have less time now for both
application development and basic research. So, what's new?
Thanks
Bill Barnes
>
>--
>Lamar Owen
>WGCR Internet Radio
>1 Peter 4:11
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, a
free web-based service from Opera Software, makers of
the award-winning Web Browser - http://www.operasoftware.com
------------------------------------------------------------
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] pgaccess on win95 connection
1999-11-30 00:30 RE: [INTERFACES] pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
@ 1999-11-30 00:58 ` Lamar Owen <lamar.owen@wgcr.org>
1 sibling, 0 replies; 6+ messages in thread
From: Lamar Owen @ 1999-11-30 00:58 UTC (permalink / raw)
To: Bill Barnes <bbarnes@operamail.com>; +Cc: pgsql-interfaces
Bill Barnes wrote:
> >2.) On the server machine, in the file '/var/lib/pgsql/pg_hba.conf', you
> >will need to add a line allowing access to the database from the IP
> >address or hostname of the Windows machine. If I remember correctly, you
> Found in this file 2 lines:
> 'local all
> trust'
> 'host all 127.0.0.1 255.255.255.255.
> trust'
> While this is not the ultimate security :-) doesn't it render the host
> accessible.
No, it doesn't. This only allows access to localhost. Assume for a
minute that the Windows machine is address 10.21.34.98. You need a line:
host all 10.21.34.98 255.255.255.255
To give access to all hosts on the 10.21.34.0 network access:
host all 10.21.34.0 255.255.255.0
> Looks like I've got to do something here before I can go any farther.
Yes, it does.
> Thanks. I will look for these. And resurrect my Windows manuals.
> Started this effort with what I thought was lots of lead time. But you know
> what a Linux adventure is like. Consequently, I have less time now for both
> application development and basic research. So, what's new?
I remember well my adventure setting up PostgreSQL (then at version
6.1.1) on Linux to back a web server. The documentation wasn't as good
then, however.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [INTERFACES] pgaccess on win95 connection
1999-11-30 00:30 RE: [INTERFACES] pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
@ 1999-11-30 01:21 ` eem21@cam.ac.uk
1 sibling, 0 replies; 6+ messages in thread
From: eem21@cam.ac.uk @ 1999-11-30 01:21 UTC (permalink / raw)
To: bbarnes@operamail.com; +Cc: lamar.owen@wgcr.org; pgsql-interfaces
On 29 Nov, Bill Barnes wrote:
>>
> [ Snip config. hints]
>
> Found in this file 2 lines:
> 'local all
> trust'
> 'host all 127.0.0.1 255.255.255.255.
> trust'
> While this is not the ultimate security :-) doesn't it render the host
> accessible.
No. These two lines allow (respectively) access from the server machine
over UDP and access from the server machine over TCP. Neither line
allows access from outside the server machine. What you want is
something like:
host all 192.168.1.0 255.255.255.0 trust
where the two numbers are IP addresses and masks suitable for your LAN,
or
host all 192.168.1.123 255.255.255.255 trust
where 192.168.1.123 is the IP address of the (single) Windows machine
from which you are connecting. And of course you want to consider the
security implications of trusting the Windows machine to tell you who
is logged on, etc. You may want to look at the other authentication
methods available.
> [ Snip more admin hints ]
HTH,
Ewan.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~1999-11-30 01:21 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-11-29 10:59 pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
1999-11-29 16:19 ` Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
1999-11-29 16:34 ` Lamar Owen <lamar.owen@wgcr.org>
1999-11-30 00:30 RE: [INTERFACES] pgaccess on win95 connection Bill Barnes <bbarnes@operamail.com>
1999-11-30 00:58 ` Lamar Owen <lamar.owen@wgcr.org>
1999-11-30 01:21 ` eem21@cam.ac.uk
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