Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 721252E0050 for ; Mon, 9 Jun 2008 18:15:28 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78689-09 for ; Mon, 9 Jun 2008 18:15:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from swip.net (mailfe01.tele2.it [212.247.154.13]) by developer.postgresql.org (Postfix) with ESMTP id 78E3F2E0047 for ; Mon, 9 Jun 2008 18:15:22 -0300 (ADT) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=nd9pq3UZPq4A:10 a=zBtazHSgq_sA:10 a=8v8WlNzLiLe-rXw4f_QA:9 a=vpsgp7HPbZGTQUPMVGgA:7 a=JT-VreMJ5RBFucV0PESEMX8nl_kA:4 a=AXjVNIk09o8A:10 a=YHMpmoEUp3FN648cPKcA:9 a=sYgfl1pODa1ChBfB940A:7 a=FvuraSx8dfW5Kull0I8pdMrMXIMA:4 a=e2mMlMFb6ZAA:10 Received: from [88.149.254.239] (account cxu-8rf-htj@tele2.it HELO [192.168.1.103]) by mailfe01.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 947200659; Mon, 09 Jun 2008 23:15:20 +0200 Message-ID: <484D9D62.8050705@geologyx.it> Date: Mon, 09 Jun 2008 23:15:14 +0200 From: Simone Gadenz User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Shane Ambler CC: pgsql-admin@postgresql.org Subject: Re: Connecting from xp to linux server References: <484D11CC.3050806@geologyx.it> <484D4097.4070807@Sheeky.Biz> In-Reply-To: <484D4097.4070807@Sheeky.Biz> Content-Type: multipart/mixed; boundary="------------030608080601030109040405" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200806/58 X-Sequence-Number: 29396 This is a multi-part message in MIME format. --------------030608080601030109040405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Shane, I attached the pg_hba.conf I have on the server. I can use pgadmin3 when I connect from the server itself, so I think the pg_hba on the server is correct. From the client machine I cannot connect through pgadmin3. Is there another way to test connection client server? Has pg a textual client to send sql statements? Thanks a lot Simone Shane Ambler ha scritto: > Simone Gadenz wrote: >> Hi all, >> >> this is the problem I am facing. >> >> I have PG 8.3 running on a KUBUNTU installation running on a virtual >> machine. From inside the virtual machine I can use PGADMIN to manage PG >> but when I try to connect from the xp machine I have this error: "Error >> connecting to the server:FATAL: missing or erroneous pg_hba.conf file" . >> >> I set the permission in the pg_hba.conf on the server. >> >> The machine talk each oher, I can ping and use telnet on the 5432 port. >> >> The log on the server does not report any problem. >> >> Ideas? >> > > If you can telnet then I would say your network and firewall is right > and the error with pg_hba.conf is where you need to look. > > The pg_hba.conf is located in the data dir that you have specified for > postgresql. Is it there? What entries do you have after all the > comments? The errornous part would indicate a small syntax error or > did you edit it on windows with cr/nl characters and copy it across to > linux? > > > -- Dr. Simone Gadenz via P. Togliatti 69, 50051 Castelfiorentino (FI) +39 339 6053660 *INFORMATIVA PRIVACY (ex D.lgs. 196/03)* Le inormazioni contenute in questo documento e nei relativi allegato possono essere riservate e sono destinate esclusivamente alla persona od alla Società indicata come destinatario. La diffusione e la distribuzione del presente documento a soggetti diversi da quelli indicati, od in genere qualsivoglia utilizzo illecito dei dati ivi contenuti, e proibita sia ai sensi dell'art. 616 del Codice Penale che dal D.Lgs 196/03 in materia di protezione dei dati personali (Privacy). Se avete ricevuto per errore questo documento siete pregati di distruggerlo e di comunicarcelo prontamente tramite e-mail o fax. --------------030608080601030109040405 Content-Type: text/plain; name="pg_hba.conf" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pg_hba.conf" # PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the # PostgreSQL documentation for a complete description # of this file. A short synopsis follows. # # This file controls: which hosts are allowed to connect, how clients # are authenticated, which PostgreSQL user names they can use, which # databases they can access. Records take one of these forms: # # local DATABASE USER METHOD [OPTION] # host DATABASE USER CIDR-ADDRESS METHOD [OPTION] # hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTION] # hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTION] # # (The uppercase items must be replaced by actual values.) # # The first field is the connection type: "local" is a Unix-domain socket, # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket. # # DATABASE can be "all", "sameuser", "samerole", a database name, or # a comma-separated list thereof. # # USER can be "all", a user name, a group name prefixed with "+", or # a comma-separated list thereof. In both the DATABASE and USER fields # you can also write a file name prefixed with "@" to include names from # a separate file. # # CIDR-ADDRESS specifies the set of hosts the record matches. # It is made up of an IP address and a CIDR mask that is an integer # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies # the number of significant bits in the mask. Alternatively, you can write # an IP address and netmask in separate columns to specify the set of hosts. # # METHOD can be "trust", "reject", "md5", "crypt", "password", "gss", "sspi", # "krb5", "ident", "pam" or "ldap". Note that "password" sends passwords # in clear text; "md5" is preferred since it sends encrypted passwords. # # OPTION is the ident map or the name of the PAM service, depending on METHOD. # # Database and user names containing spaces, commas, quotes and other special # characters must be quoted. Quoting one of the keywords "all", "sameuser" or # "samerole" makes the name lose its special character, and just match a # database or username with that name. # # This file is read on server startup and when the postmaster receives # a SIGHUP signal. If you edit the file on a running system, you have # to SIGHUP the postmaster for the changes to take effect. You can use # "pg_ctl reload" to do that. # Put your actual configuration here # ---------------------------------- # # If you want to allow non-local connections, you need to add more # "host" records. In that case you will also need to make PostgreSQL listen # on a non-local interface via the listen_addresses configuration parameter, # or via the -i or -h command line switches. # # DO NOT DISABLE! # If you change this first entry you will need to make sure that the # database # super user can access the database using some other method. # Noninteractive # access to all databases is required during automatic maintenance # (autovacuum, daily cronjob, replication, and similar tasks). # # Database administrative login by UNIX sockets local all postgres ident sameuser # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident sameuser # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 host all all 192.168.1.101 md5 host all all 192.168.159.1 md5 host all all 192.168.148.1 md5 # connections for all the pcs on the subnet # # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host all all 192.168.148.0 255.255.255.0 host all all 192.168.159.0 255.255.255.0 --------------030608080601030109040405--