LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cant rsh without password dispite following howto's! (https://www.linuxquestions.org/questions/linux-software-2/cant-rsh-without-password-dispite-following-howtos-183828/)

SourCreamAndOni 05-20-2004 03:22 PM

cant rsh without password dispite following howto's!
 
Why cant i rsh without password??????
I log on as user rolle.

my etc/hosts-file look like this
127.0.0.1 localhost
192.168.0.4 Io.rolle.se io
192.168.0.3 Europa.rolle.se europa
192.168.0.2 Callisto.rolle.se callisto
192.168.0.1 Jupiter.rolle.se jupiter

my hosts.allow:
ALL : 192.168.0.0/255.255.255.0

my hosts.equiv:
jupiter
callisto
europa

and has the following rights
-rw-r--r-- 1 root root 24 Dec 8 18:26 hosts.equiv

whats wrong???

And I know about ssh, and can use ssh without password, but I need to know whats wrong with my setup?

mastabog 06-19-2004 06:08 PM

I had the same problems and finally solved it 10 minutes ago.

You have to make sure of 4 things (3 if not root):

- That you have a file .rhosts in the home directory of the rsh server for the user you are trying to rsh under. The .rhosts file contains a line per machine that will be allowed a passwordless login. So if john would rsh w/o a password, then on the rsh server you will have /home/john/.rhosts like:
Code:

# cat /home/john/.rhosts
host1
host2

... john can then rsh w/o a password from host1 and host2.

- That the user you are rsh-ing under must have a login shell on the rsh server machine, like /bin/bash ... something like /sbin/nologin for exameple will give you errors. So make sure that john has a login shell or change it with:
Code:

# usermod -s /bin/bash john
- If you want root to rsh w/o a password, then add 3 lines in /etc/securetty on the rsh server with "rlogin", "rsh" and "rexec" (or only the first 2):
Code:

# cat /etc/securetty
....
tty11
rlogin
rsh
rexec

- you MUST be the user who is rsh'ing under on the machine you are rsh'ing from... meaning, if you are root and you do:
Code:

# rsh -l john node001 ls /tmp
Permission denied.

... you will get a "permission denied" error. You must be john and then rsh ... (weird, i know ... why is the "-l <user>" option there for then?)

And of course the /etc/hosts and /etc/hosts.equiv thingies ... :)

Hope this helped. Cheers,
Bogdan

rory526 08-09-2009 04:11 PM

thanks
 
Thanks Bogdan!


All times are GMT -5. The time now is 08:32 PM.