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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange rsh problem 2

Status
Not open for further replies.

zaxxon

MIS
Dec 12, 2001
226
DE
Hello,

I have host A (AIX 5.2 ML7) and host B (AIX 4.3.3 ML11). Host A wants to execute some command via rsh on host B. So host B got the hostname and FQDN of host A in it's .rhosts of the user being used and in it's /etc/hosts.equiv.
Strange thing is, that a simple
Code:
rsh hosta "ls"
Sometimes returns a directory list and sometimes just a "Permission denied". When I repeat this command every second for several times, I get things like 2 denies, 3 listings, then a denied, then listings and so on.
I tried that from other hosts which had been added to .rhosts and hosts.equiv (also tried without hosts.equiv using .rhosts alone), and no problem showed up. No matter how many tries and how fast I repeated the command: I got the directory listing back.

- I checked the errpt, nothing.
- inetd calls rshd every time it is needed; entry in inetd.conf is just default like on all other boxes.
- Checked hostnames and FQDNs, edited .rhost and hosts.equiv accordingly, tried it with adding the username even not really necessarry.
- I checked if rshd is running often on the target host A and host B, since rshd on the target machine does not really like to be spammed, but it is so fast, I can't make it visible for the short command.
- Both machines don't have heavy traffic by network, disks, CPU nor RAM.
- I googled for similiar problems, but usually people don't get a connection at all due to auth problems in .rhosts or hosts.equiv... no ocassionally problems.

Any hint is welcome, ty!

laters
zaxxon
 
Is host A perhaps a multi-homed host? Or do you have IP aliases running on its network interface?

If so, you may need to add all the hostnames (FQDN and short HN) for server A to the .rhosts file on host B.

Of course, it could also be an intermittent DNS problem...


HTH,

p5wizard
 
Found it:

Cloned Routing is/was activated. "netstat -rn" showed the default gateway with UGc and lots of UGHW clones of it. Doh! :)
Thanks for the help though.

laters
zaxxon
 
Sorry; I thought I found it... I was too euphoric. I flushed the routes and added the default gateway anew.
netstat -rn looked fine now; but the problem with rsh is still there :(
The guy who administers the DNS checked his entries; everything seems ok. I did some host/nslookup and everything looks fine.
There is no alias on the interface.
Any more ideas? Thanks in forward.

laters
zaxxon
 
Try telnetting from host A into host B a few times and run the command "who am i": the servername (or IP address?) in the output should give you a clue...


HTH,

p5wizard
 
I tried different machines with telnet and/or ssh and I always get strange things like:

hosta.domain.

or

hostb.domain.d

our top level domain is .de, so it's not completely displayed.
All resolve.conf look good, only two correct nameserver entries and a search entry with 2 domains. The /etc/hosts entries look ok on all machines too, having the IP, HN and FQDN.
No other problems are reported on these hosts, just that nasty rsh problem from host A to any other.
I also checked the HN set in the ODM of the machines and it is either the HN or the FQDN, but nothing like a cut off or partly cut off top level domain name.

In all these tries I tried to use rsh between two hosts, that don't print a proper FQDN when doing a "who am i". I tried it very often and it works nevertheless without problems. So I guess it might not be the problem, having those mutilated FQDNs (though they are not nice to look at).

laters
zaxxon
 
Did you ever try doing a reverse lookup? Do a nslookup with just the name. Then the fully qualified name. Then just the IP address. Do this on both sides.

I have had problems with things working one way but not the other because of it....

To prove it is not DNS, just add the Hostnames to the /etc/hosts and see if you see the same problem...

Just a thought.
 
I just did a lot of host/nslkookup against the HN, FQDN and IPs. I saw that sometimes there is a wrong/old name for the IP of host A.
The DNS guy fixed the old entries since they joined some DNS servers/zone files together and now there is always the correct name/IP resolving. rsh has no problems anymore.

Thanks a lot for all your help ^^

laters
zaxxon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top