1827458 Members
5512 Online
109965 Solutions
New Discussion

about rhosts

 
SOLVED
Go to solution
juno2
Super Advisor

about rhosts

I have modified the local host file /.rhosts as "+ +" or "my_ip root" but the remote host still can't rlogin as root to my host , can suggest what file i should check ? thx
16 REPLIES 16
Balaji N
Honored Contributor

Re: about rhosts

++++++
NOTE
Some systems will only honor the contents of this file when it has
owner root and no write permission for anybody else. Some exceptionally
paranoid systems even require that there be no other hard links to the
file.
+++++

snipped from the man page.btw, is there any firewall? are u able to rlogin after supplying the passwd?
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Vitaly Karasik_1
Honored Contributor
Solution

Re: about rhosts

in RH Linux

1) for all users - user has to be owner of .rhosts without write permission for group/others

2) for all users - "+" is unacceptable instead of hostname (unlike HPUX, for example)


3) for root - you need
echo "rsh" >>/etc/securetty
echo "rlogin" >>/etc/securetty

Vitaly
juno2
Super Advisor

Re: about rhosts

After making the following modification
"echo "rsh" >>/etc/securetty
echo "rlogin" >>/etc/securetty " , does it need to restart any service ? thx.
Balaji N
Honored Contributor

Re: about rhosts

hi,
if i am correct, there is no need to restart any service.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
juno2
Super Advisor

Re: about rhosts

hi Bala ,

I have add the rlogin to the file /etc/securetty on my host but still can't let the remote user to rlogin to my host , can suggest what is wrong in my setting ? thx
Vitaly Karasik_1
Honored Contributor

Re: about rhosts

no.

BTW, is rsh enabled:

chkconfig --list |grep rsh

?
juno2
Super Advisor

Re: about rhosts

hi Vitaly Karasik ,

I run your statement , but no "on" pop up, I have checked the file /etc/securetty , I sure the entry "rsh" in the last line , what is wrong in my setting ? thx.
juno2
Super Advisor

Re: about rhosts

In my file /etc/securetty , the content is
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
rlogin
rsh

should remove these entries ? thx.
Vitaly Karasik_1
Honored Contributor

Re: about rhosts

your /etc/securetty is OK, but you need activate rsh

chkconfig rsh on


Of course, you need rsh and xinetd packages, in RH it's

rsh-x.y-z

and

xinetd-x.y-z


run rpm -q xinetd

and

rpm -q rsh

in order to check if you have these packages installes
juno2
Super Advisor

Re: about rhosts

hi Vitaly Karasik ,

i checked that rcp and xinetd is installed , but can't run "chkconfig rsh on" - "error reading information on service rsh: No such file or directory" , what is wrong in my system ? thx.
Balaji N
Honored Contributor

Re: about rhosts

hi

is your xinetd enabled.

1. chkconfig --list

(are you able to see xinetd and rsh as a service of xinetd)

2. chkconfig xinetd on

(does xinetd gets enabled now)

3. chkconfig rsh on

(rsh gets enabled now)

still stuck?
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
juno2
Super Advisor

Re: about rhosts

hi Bala,

when run /sbin/chkconfig rsh on , then it pop up the error "error reading information on service rsh: No such file or directory" , what is wrong in my system ? thx.
Vitaly Karasik_1
Honored Contributor

Re: about rhosts

could you please send us output of

chkconfig --list |grep rsh


and


rpm -qi rsh


and


rpm -qi xinetd

?
Balaji N
Honored Contributor

Re: about rhosts

hi,
is rsh installed?
++++++++++++++++++
[coe@volga coe]$ rpm -qf /usr/sbin/in.rshd
rsh-server-0.17-10
[coe@volga coe]$ rpm -qi rsh-server-0.17-10
Name : rsh-server Relocations: (not relocateable)
Version : 0.17 Vendor: Red Hat, Inc.
Release : 10 Build Date: Mon 24 Jun 2002 05:35:15 AM IST
Install date: Wed 17 Apr 2002 09:53:13 PM IST Build Host: perf90.perf.redhat.com
Group : System Environment/Daemons Source RPM: rsh-0.17-10.src.rpm
Size : 60054 License: BSD
Signature : DSA/SHA1, Wed 04 Sep 2002 04:06:58 AM IST, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <>
Summary : Servers for remote access (rsh, rlogin, rcp).
Description :
The rsh-server package contains a set of programs which allow users to
run commmands on remote machines, login to other machines, and copy
files between machines (respectively, rsh, rlogin, and rcp). All three
of these commands use rhosts style authentication. This package
contains the servers needed for all of these services. It also
contains a server for rexec, an alternate method of executing remote
commands.
++++++++++++++++++


if not pls install. can u pls provide the output of chkconfig --list.

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
juno2
Super Advisor

Re: about rhosts

 
Vitaly Karasik_1
Honored Contributor

Re: about rhosts

can you please send also:

1) ls -l .rhosts


2) cat .rhosts


BTW, does rsh work for regular users?