Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

hosts in /etc/hosts not resolved

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> hosts in /etc/hosts not resolved Page: [1]
Login
Message << Older Topic   Newer Topic >>
hosts in /etc/hosts not resolved - Sep. 7, '06, 11:53:17 AM   
gregmb

 

Posts: 26
Status: offline
maybe this has been covered before but I haven't been able to find it.

Interix 3.5 on Windows XP Pro
I've install the main hotfixes for SFU


Anyway, I have added IP/hostnames to /etc/hosts however when I try to 'ping "name"' I get the
error that "name" is not found.

for example /etc/hosts

172.16.0.10 lock1


ping lock1

ping: unknow host lock1

So what I'm I doing wrong?

Thanks
Greg
Post #: 1
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 12:37:58 PM   
eperea

 

Posts: 70
Joined: Apr. 6, '05,
Status: offline
Is your /etc/hosts files still a symbolic link to the Windows hosts file? What I have is:

/etc/hosts -> /dev/fs/C/WINDOWS/system32/drivers/etc/hosts

(in reply to gregmb)
Post #: 2
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 1:10:25 PM   
gregmb

 

Posts: 26
Status: offline
yes it's still a symbolic link.

Greg

(in reply to eperea)
Post #: 3
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 1:39:15 PM   
eperea

 

Posts: 70
Joined: Apr. 6, '05,
Status: offline
Do you have "lookup file bind" in /etc/resolv.conf?

(in reply to gregmb)
Post #: 4
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 1:48:09 PM   
gregmb

 

Posts: 26
Status: offline
Interesting, I had 'file bind lockup'
I changed it to 'lookup file bind' with no effect, unless I neeed to reboot?

Also the complete resolv.conf has the following:
#
search
lookup file bind
nameserver 10.190.213.196

(in reply to eperea)
Post #: 5
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 2:14:32 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
The search line should have the domain that your machine is part of (e.g. "bird.com").

The /etc/resolv.conf doesn't actually have an effect on ping. Try commenting
out the "nameserver" line and you'll see. (This is the ping that ships on the CD).
The hostname lookup is a system call that in turn calls WinSock for resolution.
It's really WinSock that needs to be reading the "hosts" file.

(in reply to gregmb)
Post #: 6
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 2:28:52 PM   
gregmb

 

Posts: 26
Status: offline
commenting out the nameserver had no effect.

rsh also seems to have the same problem.

The hostnames have no domain, they are on a private subnet (i.e. another NIC)
and have simple names. These nodes/hostnames are embedded controllers, no way to
alter their hostnames.

rsh & ping work when you give the IP.

So what do I need to do to get these names resolved?

I've seen this work on other XP Pro / SFU 3.5 machines.

Thanks
Greg

(in reply to Rodney)
Post #: 7
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 3:10:09 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> commenting out the nameserver had no effect.

That's right. Because the ping on the CD uses the system call that uses WinSock which doesn't
know anything about /etc/resolv.conf.

> I've seen this work on other XP Pro / SFU 3.5 machines.

Yeah, it works for me as long as the "...system32/drivers/etc/hosts" file is the one that gets changed.
I don't need to reboot. So the file is regularly re-read by WinSock.
You have /etc/hosts as the symlink so that should be fine.

In the registry HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
the entry "DataBasePath": is it set to "%SystemRoot%\System32\drivers\etc" ?

(in reply to gregmb)
Post #: 8
RE: hosts in /etc/hosts not resolved - Sep. 7, '06, 3:21:43 PM   
gregmb

 

Posts: 26
Status: offline
Yes, that is what the register parameter is set to.

(in reply to Rodney)
Post #: 9
RE: hosts in /etc/hosts not resolved - Sep. 8, '06, 3:22:57 PM   
markfunk

 

Posts: 669
Joined: Mar. 31, '03,
Status: offline
How about posting the results of the following commands:

$ /bin/uname -X
$ /bin/ls -l /etc/hosts
$ /bin/cat /etc/hosts
$ /bin/ls -l /bin/ping
$ /bin/ping lock1
$ /usr/contrib/win32/bin/wping lock1

Maybe from this we can debug it for you.

(in reply to gregmb)
Post #: 10
RE: hosts in /etc/hosts not resolved - Sep. 8, '06, 4:36:02 PM   
gregmb

 

Posts: 26
Status: offline
I was just looking at when I got your post.

I found the problem, the C:/WINDOWS/system32/drivers/etc/hosts file had odd permissions

-r-xrwx--- 1 +Administrators +SYSTEM ....... hosts

I changed it to -rwxrwxrwx , then ping and rsh started to resoled the names

Can someone list what the owner ship and permissions of these files should be.

The 'group' file appears to be owned not by Administrator but by a user account

and group, hosts, passwd , etc. also seem to vary in permissions.

So I not sure what is correct for them.


Thanks
Greg

(in reply to markfunk)
Post #: 11
RE: hosts in /etc/hosts not resolved - Sep. 8, '06, 6:19:19 PM   
eperea

 

Posts: 70
Joined: Apr. 6, '05,
Status: offline
This is what I have:
artemis:/dev/fs/C/WINDOWS/system32/drivers/etc
{13} % l
total 14
-rwxrwx---+ 1 +Administrators  +SYSTEM        734 Sep  7 12:35 hosts*
-rwxrwx---+ 1 +Administrators  +SYSTEM       3683 Aug  4  2004 lmhosts.sam*
-rwxrwx---+ 1 +Administrators  +SYSTEM        407 Aug  4  2004 networks*
-rwxrwx---+ 1 +Administrators  +SYSTEM        799 Aug  4  2004 protocol*
-rwx------+ 1 eperea           Domain Users   205 Jul 30 12:40 resolv.conf*
-rwxrwx---+ 1 +Administrators  +SYSTEM       7116 Aug  4  2004 services*

[C:\WINDOWS\system32\drivers\etc\]cacls *
C:\WINDOWS\system32\drivers\etc\hosts BUILTIN\Users:R 
                                      BUILTIN\Power Users:R 
                                      BUILTIN\Administrators:F 
                                      NT AUTHORITY\SYSTEM:F 

C:\WINDOWS\system32\drivers\etc\lmhosts.sam BUILTIN\Users:R 
                                            BUILTIN\Power Users:R 
                                            BUILTIN\Administrators:F 
                                            NT AUTHORITY\SYSTEM:F 

C:\WINDOWS\system32\drivers\etc\networks BUILTIN\Users:R 
                                         BUILTIN\Power Users:R 
                                         BUILTIN\Administrators:F 
                                         NT AUTHORITY\SYSTEM:F 

C:\WINDOWS\system32\drivers\etc\protocol BUILTIN\Users:R 
                                         BUILTIN\Power Users:R 
                                         BUILTIN\Administrators:F 
                                         NT AUTHORITY\SYSTEM:F 

C:\WINDOWS\system32\drivers\etc\resolv.conf BUILTIN\Users:R 
                                            BUILTIN\Power Users:R 
                                            BUILTIN\Administrators:F 
                                            NT AUTHORITY\SYSTEM:F 
                                            WALKER\eperea:F 

C:\WINDOWS\system32\drivers\etc\services BUILTIN\Users:R 
                                         BUILTIN\Power Users:R 
                                         BUILTIN\Administrators:F 
                                         NT AUTHORITY\SYSTEM:F 

(the resolv.conf was added for the BIND utilities for Windows, not SFU)

(in reply to gregmb)
Post #: 12
Page:   [1]
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> hosts in /etc/hosts not resolved Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.063