1835025 Members
2502 Online
110073 Solutions
New Discussion

rlogin issue

 
SOLVED
Go to solution
so_2
Regular Advisor

rlogin issue

I have 3 servers say A,B,C.
Hi

I am login in to A ans sud to root.
All the servers have .rhosts file and carries the host name and root entry for the others.
I can rlogin from A to B and C.
I can rlogin from C to B.
But the rlogin attempt from B to C is asking for password.
Please help me how to come out of this.
thanks.
s.o
7 REPLIES 7
Senthil Kumar .A_1
Honored Contributor

Re: rlogin issue

Hi,

Please check for the permission and contents of .rhosts file on server C.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Senthil Prabu.S_1
Trusted Contributor

Re: rlogin issue

Hi,
Check the .rhost file in machine C. It should have a corresponding entry for machine B.

IF still pbm exist, post the error message and as well as the rhost relavant syslog messages.


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
RAC_1
Honored Contributor
Solution

Re: rlogin issue

The problem is from B to C.
When I run into such problems, this is how I troubleshoot.

From B, do plain telnet to C. Login with user_id and pass. Once logged on, do who -um
Not down the ip_address/hostname in the last column of above command. What you see here should exactly be in .rhosts file on C server in Home dir. Exact same name/ip you see in who -um and nothing else.

.rhosts would look like follows.

ip/hostname_from_who -um "user_name_you_will_be_using"
There is no substitute to HARDWORK
so_2
Regular Advisor

Re: rlogin issue

Thanks to all who relpied...

The solution given by RAC worked in the first attempt itself.Could you please explain why is it so?

Points have been assigned to all.

Thanks again

S.O
Arunvijai_4
Honored Contributor

Re: rlogin issue

Hi S.O,

It could be due to hostname resolve issues from B to C.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bill Hassell
Honored Contributor

Re: rlogin issue

The r-commands (rexec, remsh, rlgoin, rcp) are high risk commands because they do not ask for a password. To protect against external attacks as much as possible, the daemons running on the remote side will perform a validation of the incoming computer's IP address and hostname. So the password is requested whenever the remote computer cannot check the address.

Now how is this performed? Well, if you remove /etc/resolv.conf from the remote machine then the hosts file is all there is and it must contain both the IP and hostname of the incoming machine. And of course, the .rhosts file must also have the remote computer's name and/or the IP address.

DNS gets more complicated, mostly because DNS is often handled by Windows admins and fail to create reverse IP lookups and MX records. If DNS is used on the remote system, you must test the .rhosts file by using nslookup to lookup the IP address and also the hostname -- both queries must match.

And finally, .rhosts must always be 600 (-rw-------) permission. Never allow .rhosts files to be read by anyone except the owner. And /etc/hosts.equiv is quite dangerous as it defines a .rhosts file for every user on the system.

That said, if these systems are important, consider installing ssh from HP and shutting down all the r-services for security.


Bill Hassell, sysadmin
so_2
Regular Advisor

Re: rlogin issue

Thanks to Arunvijaya and Bill Hassell. The explanation from Bill was very useful. Yes as you said my dns server for this server is handled by windows team and reverse lookup is not enabled.
points have been assigned.

Thanks again.
S.O