pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: nscd [was] how do you run postgres without dns server
2+ messages / 2 participants
[nested] [flat]

* Re: nscd [was] how do you run postgres without dns server
@ 2004-11-10 15:19 Ivan Dimitrov <dobber@bastun.net>
  2004-11-11 01:07 ` Re: nscd [was] how do you run postgres without dns server S. C. <sc@eg-1.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Ivan Dimitrov @ 2004-11-10 15:19 UTC (permalink / raw)
  To: pgsql-admin

Yes that is true too. I've checked it all. It apears that postgres tries to 
resolve only through dns'...:(

I think that the problem is in the postgresql, but I can't reproduce the 
problem anymore, because I was forced to install a caching dns server, and 
I'm not allowed to play with it anymore (business must run).

The nscd problem:
I didn't post this before, because I thik this is not a postgres related 
problem, but after a few hours playing with it I couldn't fix the problem
I have nscd + pgsql backend
I have 
passwd:         compat [NOTFOUND=continue SUCCESS=return] pgsql
group:          compat [NOTFOUND=continue SUCCESS=return] pgsql

in /etc/nsswitch.conf
The logic of this, from what I could understand from the documentation is:
"Look in the standart files (/etc/passwd, /etc/group)" for username and 
groups, if not found, search in pgsql databasee, else return successfull"

The problem is that when I stop the database and I try to `id realuser` it 
gives:
# id root
Could not connect to database

The system is Debian sarge with packages:
nscd                  2.3.2.ds1-18
libnss-pgsql1  1.0.2-1.2 
postgresql       7.4.5-3

На 10.11.2004 16:08 Oliver Elphick написа:
> On Wed, 2004-11-10 at 12:15 +0200, Ivan Dimitrov wrote:
> > Yes, it is there
> > 127.0.0.1        localhost
> > but when i strace postmaster on startup it never looks in /etc/hosts
>
> Look at the "hosts:" line in /etc/nsswitch.conf.  It needs to have the
> word "files" in there.

-- 


Hi! I'm your friendly neighbourhood signature virus.
Copy me to your signature file and help me spread!

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

* Re: nscd [was] how do you run postgres without dns server
  2004-11-10 15:19 Re: nscd [was] how do you run postgres without dns server Ivan Dimitrov <dobber@bastun.net>
@ 2004-11-11 01:07 ` S. C. <sc@eg-1.com>
  0 siblings, 0 replies; 2+ messages in thread

From: S. C. @ 2004-11-11 01:07 UTC (permalink / raw)
  To: pgsql-admin

Do you got "hosts: files dns" in your nsswitch.conf?
Otherwise , /etc/hosts won't be used.


-----------------------------------------------------------------
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
 
passwd:         compat
group:          compat
shadow:         compat
 
hosts:          files dns
networks:       files
 
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
 
netgroup:       nis
----------------------------------------------

Regards
Simon Chen.

---------- Original Message -----------
From: Ivan Dimitrov <dobber@bastun.net>
To: pgsql-admin@postgresql.org
Sent: Wed, 10 Nov 2004 17:19:47 +0200
Subject: Re: [ADMIN] nscd [was] how do you run postgres without dns server

> Yes that is true too. I've checked it all. It apears that postgres 
> tries to resolve only through dns'...:(
> 
> I think that the problem is in the postgresql, but I can't reproduce 
> the problem anymore, because I was forced to install a caching dns 
> server, and I'm not allowed to play with it anymore (business must 
> run).
> 
> The nscd problem:
> I didn't post this before, because I thik this is not a postgres 
> related problem, but after a few hours playing with it I couldn't 
> fix the problem I have nscd + pgsql backend I have passwd:         
> compat [NOTFOUND=continue SUCCESS=return] pgsql group:         
>  compat [NOTFOUND=continue SUCCESS=return] pgsql
> 
> in /etc/nsswitch.conf
> The logic of this, from what I could understand from the 
> documentation is: "Look in the standart files (/etc/passwd,
>  /etc/group)" for username and groups, if not found, search in pgsql 
> databasee, else return successfull"
> 
> The problem is that when I stop the database and I try to `id 
> realuser` it gives:
> # id root
> Could not connect to database
> 
> The system is Debian sarge with packages:
> nscd                  2.3.2.ds1-18
> libnss-pgsql1  1.0.2-1.2 
> postgresql       7.4.5-3
> 
> Íà 10.11.2004 16:08 Oliver Elphick íàïèñà:
> > On Wed, 2004-11-10 at 12:15 +0200, Ivan Dimitrov wrote:
> > > Yes, it is there
> > > 127.0.0.1        localhost
> > > but when i strace postmaster on startup it never looks in /etc/hosts
> >
> > Look at the "hosts:" line in /etc/nsswitch.conf.  It needs to have the
> > word "files" in there.
> 
> --
> 
> Hi! I'm your friendly neighbourhood signature virus.
> Copy me to your signature file and help me spread!
------- End of Original Message -------




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


end of thread, other threads:[~2004-11-11 01:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10 15:19 Re: nscd [was] how do you run postgres without dns server Ivan Dimitrov <dobber@bastun.net>
2004-11-11 01:07 ` S. C. <sc@eg-1.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