Hello, Can someone tell me the differences between the files /etc/host.conf and /etc/nsswitch.conf with respect to host resolution? Why do we have two files and how do they interact with each other - i.e. what order are they looked at?
If I add entries such as: /etc/hosts.conf: 10.0.0.1 jh /etc/host.conf: order hosts,bind /etc/nsswitch.conf: hosts: files dns then telnetting to 'jh' works fine. If I change the order of the entries in host.conf and/or nsswitch.conf then it still works fine. However, if I say: /etc/host.conf: order hosts,bind /etc/nsswitch.conf: dns [notfound=return] hosts Then the telnet session fails. I would have thought that the 'hosts' in host.conf would look in /etc/hosts for the entry? The error I get is: telnet: jh: Name or service not known jh: Unknown host I have read the man pages of nsswitch, host.conf and gethostbyname, but it didn't really explain the order in which all these files are used. Likewise running strace on the telnet command didn't help too much. I could see the files being opened (all of them, and resolv.conf), but that doesn't say in which order their entries are accessed. Searching the mailing list archives also didn't throw up too much (a lot, but not to what I wanted). Thanks, John. ------------------------------------------------------------------------ John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] PGP key available from public key servers _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list