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 |
|
Login |
|
|
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
|
|
|
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
|
|
|
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
|
|
|
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?
|
|
|
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
|
|
|
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.
|
|
|
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
|
|
|
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" ?
|
|
|
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.
|
|
|
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.
|
|
|
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
|
|
|
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)
|
|
|
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 |
|
|
|