Operating System - Linux
1819809 Members
2927 Online
109607 Solutions
New Discussion юеВ

Where should .rhosts be located?

 
Mei Jiao
Respected Contributor

Where should .rhosts be located?

Hi all,

I tried to install OB software from IS. However the remote login didn't work even I've put this in the file /.rhosts:
root

I've tried to copy /.rhosts to /root/.rhosts, but it still doesn't work. I'm not so familiar with Linux, what should be the .rhosts right location? /.rhosts or /root/.rhosts? How to make the thing works?

Thanks in advanved!

Mei
8 REPLIES 8
Tom Ward_1
Honored Contributor

Re: Where should .rhosts be located?

Hello Mei,

The .rhosts file for the individual goes in the user's home directory. Typically that is /root on linux.

HTH,
Tom

Tom Ward_1
Honored Contributor

Re: Where should .rhosts be located?

Hello Mei,

I don't know what OB software is, but do you really need to use rservices to get it. Most current linux distributions have rservices turned off, since they are insecure. Can you use ssh/scp instead? I think you'll have better luck with that if you can.

Regards,
Tom
Vitaly Karasik_1
Honored Contributor

Re: Where should .rhosts be located?

Mei,
If you really need to use r-commands for root, you should do the following:
1) put .rhosts into /root directory with 600 permission
2) add "rsh" and "rlogin" to /etc/securetty file
3) chkconfig rsh on
and
chkconfig rlogin on
Steve Andrews_6
Frequent Advisor

Re: Where should .rhosts be located?

The .rhosts file belongs in the home directory of the user that will be using it. Most times that will be root and the file belongs in the root home directory. However, I use this structure to run scripts across systems as my own user ID and I have a .rhosts file in my home directory to make that happen.
In God We Trust
Sivakumar TS
Honored Contributor

Re: Where should .rhosts be located?

Dear Mei,

The .rhosts file should be there in the correcsponding users HOME directory.

In our case we need to put in the root users HOME, please check the same from /etc/passwd file or login as root and do echo $HOME. and save the file there.

Also you check the /etc/hosts.equiv file in the IS_server for the entry for this server.

It will work.

With Regards,

Siva.
Nothing is Impossible !
Bill Thorsteinson
Honored Contributor

Re: Where should .rhosts be located?

The r* commands may not be installed, or
may be disabled in the inetd.conf or
xinetd.conf files.

Many system disable these commands by default
because of there security implications.

Consider using ssh to provide the
functionality. I believe you can alias
the r* commands into ssh.
Chan 007
Honored Contributor

Re: Where should .rhosts be located?

.rhosts should be in home dir of the user who needs it. Normally in your case root. Check the root home and add.

Also you need the shell in /etc/services, which enabled remote system to execute commands.

Cheers.
john kingsley
Honored Contributor

Re: Where should .rhosts be located?

Double check and make sure the rsh-server is installed:

rpm -q rsh-server

Most linux installations don't include it by default. On Red Hat installations, it is included with the "Legacy Network Server" bundle.