Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Host name Lookup Failure :- Need your expertise.

Status
Not open for further replies.

salimwng

IS-IT--Management
Mar 11, 2002
134
MU
PLATFORM : SCO Unix Sys V - Rel 3.2.4.2

Hi guys,

Many of you advised me to make use of .rhosts in main directory ( i.e. / ) and that of /etc/hosts.equiv, so that i can make use of rcp and rsh.

Unfortunately, i am having the above error message ( Hostname lookup failure ).

The server name of first machine of Unix486 ( IP address 10.0.0.10) and that of the second one is DemoUnix ( IP address 10.0.0.3 ).

File /.rhosts and /etc/hosts.equiv on Machine 1 have got;
# @(#)hosts 1.2 Lachman System V STREAMS TCP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
10.0.0.10 Unix486
10.0.0.48 PENTIUM_4
10.0.0.3 DemoUnix

and

File /.rhosts and /etc/hosts.equiv on Machine 2 have got;

# @(#)hosts 1.2 Lachman System V STREAMS TCP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
10.0.0.3 DemoUnix
10.0.0.48 PENTIUM_4
10.0.0.10 Unix486

I have made lots of research on this in the forums but couldn't get any idea how to make it work.

Could you please give me a helping hand in this. I badly need to setup this remote copy.

I came across something ( /etc/netutil ), but this one works on serial line. I need this to work on TCP/IP.

Counting much on you guys,
Thank you
Salim

 
You shouldn't need a seperate .rhosts file as /etc/hosts.equiv is global. Also do both logins exist on both Unix servers? If they don't, I don't believe this will work.
 
Are you using DNS for name resolution ?
If not then try this

machine A

add entry in /etc/hosts for remote machien say machine B

in /etc/hosts.equiv ( add entry host username )
machineb root

check permissions of file is 644

in .rhosts file in / add machineb root
permissions on this file should be 600


Do the reverse on machineb , i.e. entry machinea details

then try rcp/rsh

what i beleiev on this version of SCO is the .rhosts allows you to login without a password and hosts.equic allows you to run ,rsh,rcp etc commands

HTH
 
I have performed all the steps you mentioned above ( pmcmicha + DSMARWAY ), but i am still having Hostname Lookup Failure.

Do you have anything else in mind i can try ?

Thanks a lot for your precious help.
 
Check /etc/services. Add the local IP and remote host IP addresses in this file.

You said have already added the IP addresses to:

/etc/hosts
/etc/hosts.equiv
/.rhosts

Also ensure you unlock the host under Role Programs-Security Officer Role.
 
Try , using the ip address rather than the name of hosts in your .rhosts , hosts.equiv file i.e.
rather than machinea root
do 1.1.1.1 root

on both servers and then try

rcp,rsh,rlogin etcc but use the ip address instead

because what I am thinking is whether the hostname is not resolved properly i.e. when you do rlogin machineb
its not looking in the hosts file to resolv the name to an ip address ? but something el;se like DNS .
Are you using DNS ?
 
I have tried rcp by using the following command;

On first Machine ( Unix486 ) i have typed the following command;

root> rcp DemoUnix486.AWDOM:/u/peg/IDA/pglog.dat /u/peg/IDA

I obtain the error message " Hostname Lookup failure"

When i do this command;

root> rcp 10.0.0.3:/u/peg/IDA/pglog.dat /u/peg/IDA

I obtain the error message " Unknown Host "

I think it will be good if add this too,

I tried to make some changes in the /etc/hosts + /etc/hosts.equiv and /etc/hosts.lpd on both Unix Machines. I have added the .AWDOM to the end of the system name. This time i get this kind of error message;

"Permission denied" and it will be good to add that this error message appear after a few milliseconds, not instantly on the screen. I guess it's a problem of permissions between these two ! But what file or permissions is involved in that ??????

I hope above can guide you in something new.

Many thanks guys for all the intervention you are doing for this ! I do appreciate a lot.
 
If you get permission denied then it finally "resolved" (see /etc/resolv.conf)
the remote host but the remote host has denied the operation.


are permissions on .rhosts set to 600?
do permissions on the target directory allow for writing?

first thing to do would be to change all your references
to host.domain to "lower" case. I'm sure there is an rfc out
there that says these must all be lower case no matter
what microsoft tries to do otherwise.
 

I have got the /etc/resolv.conf file present in the /etc directory. OWNER is root, GROUP is other and MODE is 0644. Please see below the content of the resolv.conf;

domain AWDOM
Unix486.AWDOM 10.0.0.10
DemoUnix.AWDOM 10.0.0.3

Please note that this file is identical on both Unix servers. Is it correct ?

Also permissions of /.rhosts is 0600. Both Machines have got the same /.rhosts in their root directory with same contents as mentioned above. I will display again the contents of /.rhosts below. It's the same thing as hosts.equiv

# @(#)hosts 1.2 Lachman System V STREAMS TCP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
10.0.0.10 Unix486.AWDOM
10.0.0.48 PENTIUM_4
10.0.0.3 DemoUnix.AWDOM

As for the lower case issue, do you mean that i have to change the Unix486.AWDOM to unix486.awdom ?

Please let me know. Will this involve a reboot of the machine ? I hope not, because this server is left on 24/24, 7/7. It's being switched off only during a maintenance program.

Thanks guys,
Salim
 
Your resolv.conf file does not look right. Your missing the nameserver entry ? It should be in the following form

domain company.com
nameserver 192.1.1.10



where 192.1.1.10 is the IP address of your nameserver



Also make sure /etc/hosts has both machine listed
-Danny
dan@snoboarder.net






 
Hi Dany,

I made the changes in the /etc/resolv.conf. Is is correct ?

domain AWDOM
nameserver 10.0.0.10
nameserver 10.0.0.3

But however it is still not working. Am getting the error message " Permission Denied"

What else can i try you think ?

Also i have tried the rlogin. It's working. It ask me the user name, the password and i can login correctly.

Regards.
Salim
 
This is what you posted earlier:
> The server name of first machine of Unix486 ( IP address > 10.0.0.10) and that of the second one is DemoUnix ( IP
> address 10.0.0.3 ).

Unless 10.0.0.10 and 10.0.03 are name servers on your network you should not list them in your /etc/resolv.conf

/etc/resolv.conf is used for client side DNS resolution(host name resolution)

Question: do you have a name server running on your network ? If so that would be the IP you should list in /etc/resolv.conf

domain company.com
nameserver primary_nameserver
nameserver secondary_nameserver



-Danny
dan@snoboarder.net






 
what are the permissons set to on these two files

/etc/hosts

/etc/resolv.conf -Danny
dan@snoboarder.net






 
Hi Dany,

You asked: Do you have a name server running on your network ?

My answer:- What is a name server on the very first ?

When i type the command uname -X i get Unix486 on Machine 1 ( his IP address in is 10.0.0.10 ). When i type uname -X on the second machine i get DemoUnix.AWDOM ( his IP address is 10.0.0.3 ).

I guess through above that the name server is then Unix486 and DemoUnix.

By the way Dany, the Unix machine is used only for the corporate software ( Pegasus Senior ). We do not use the Unix for sending email or whatever. It's only for the business application.

Also we uses Alpha Communicator ( on Win9X PC's ) to telnet/connect to it. We just select connection through TCP/IP and we enter the IP address 10.0.0.10, and we get the login screen ( same as on the Unix console ).

All above said, i am now completely confused why is it that from a Unix box to another Unix box it does not recognise the IP address 10.0.0.10 or 10.0.0.3. I need to enter Unix486.AWDOM or vice versa, i.e. DemoUnix.AWDOM !

As for the permissions of /etc/hosts and /etc/hosts.equiv both are 0644 ( as mentioned above). I wonder if i need to change it to 0744 ???? What do you think ?

 
On your windows box run the following command from a dos promt:

ipconfig /all

towards the bottum of the page you will see something like this:

DNS Servers . . . . . . . . . . . : 10.1.2.22
10.1.2.21

These most likely would be the IP addresses you would use in the /etc/resolv.conf file on your unix machines

domain company.com
nameserver 10.1.2.21
nameserver 10.1.2.22

(this is only an example)


on the opposing unix machines can you ping the hostname of the other unix box.

Does it resolve the hostname to IP address ?

If your able to resolve the hostname to IP address by pinging the hostname this is not the problem area.





-Danny
dan@snoboarder.net






 
Well....Dany, i tried the command you said above ( i.e. IPCONFIG /ALL ). I checked at the DNS, it's blank. There's nothing at it. I've got the IP address of the machines, the sub net mask, just the DNS is blank.

Coming back to the Unix box. When i tried to ping Unix machine 1 from Machine 2 by typing ping 10.0.0.10, it works fine ( no loss at all ). Vice versa it's working. Now when i try to ping by using the nameserver ( i.e. by typing ping Unix486.AWDOM ) this one too works, and it gives me the IP address ( 10.0.0.10 ) also next to it.

So i guess, by assuming your theory, the problem does not lie over here.

Well Dany, what could be the bugger inside this system ?????

Yeah, one more thing, I would like to change it's persmission from 0644 to 0744. But i fear if it's gonna affect something else in the system. I have remote printing also running. Do you think it's worth trying ???

Thanks for all the time you are putting into this. I sincerely appreciate it.

Regards.
Salim
 

Hi Dany,

I changed the chmod to 0744, and guess what ? It's working ! Yeah..... rcp is working successfully.

I am so happy. I went to the office since morning and fighted a lot with that. Finally....well better now than never.

I would like to thank you a lot Dany and the other guys, who contributed in guiding me much in this. I have learnt many things through you.

Keep well guys , you are the true hero's

Regards.
Salim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top