RSH & PAM

From: Chris (Chris@zee.com)
Date: 06/25/02


From: "Chris" <Chris@zee.com>
Date: Tue, 25 Jun 2002 00:51:05 GMT

I am trying to get rsh to work on a 7.2 system within a small isolated
network. I have done the following:

1. enabled the service in /etc/xinetd.d/rsh
2. created a .rhosts file in the home directory
This didn't work. I get "permisstion denied" when I tried to rsh into the
system.

I then looked at /etc/pam.d./rsh and had the following:

auth required /lib/security/pam_nologin.so
auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_env.so
auth required /lib/security/pam_rhosts_auth.so
account required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth

I changed the rhosts line to read:
auth sufficient /lib/security/pam_rhosts.auth.so

This seemd to enable me to rsh into the machine. I then deleted the .rhosts
file in the home directory to make sure rsh was using .rhosts for
authentication. It still worked after the .rhosts file was removed. The
/var/log/messages had:

Jun 16 13:26:27 test_machine pam_rhosts_auth[2050]: denied to
chris@192.168.0.4 as chris: access not allowed
Jun 16 13:26:27 test_machine rsh(pam_unix)[2050]: session opened for user
chris by (uid=0)

The first /var/log/messages line above says access not allowed, yet it let
me in.

I checked redhat site and it stated the following in referance to the
sufficient line:

"auth sufficient /lib/security/pam_rhosts_auth.so

Fourth, if pam_rhosts_auth.so authenticates the user using .rhosts in the
user's home directory, PAM immediately authenticates......If
pam_rhosts_auth.so fails to authenticate the user, that failed
authentication is ignored. "

The way I read this is that the .rhosts file is to be consulted. Has anyone
else run into this or am I missing somthing?

I can rsh in if the .rhosts file is present on not. As soon as a return
sufficient to required I can no longer rsh in even if I have a .rhosts file.

Thanks



Relevant Pages

  • RSH & PAM
    ... I am trying to get rsh to work on a 7.2 system within a small isolated ... created a .rhosts file in the home directory ... It still worked after the .rhosts file was removed. ... authentication is ignored. ...
    (comp.os.linux.security)
  • Re: RSH & PAM
    ... created a .rhosts file in the home directory ... I get "permisstion denied" when I tried to rsh into the ... It still worked after the .rhosts file was removed. ... > authentication is ignored. ...
    (comp.os.linux.security)
  • Re: Trying to rsh from Win2000 to Tru64 V5.1A - Why doesnt this work ??????
    ... > Peter da Silva wrote: ... >> rhosts and rsh won't work. ... If the rhosts file is correct and working, then rexec shouldn't ask for a ...
    (comp.unix.tru64)
  • Re: rsh works on the ksh prompt but not in a shell script
    ... > EOF ... Read the man page for rsh :-) ... Create a .rhosts file in the home directory of the user you want to ...
    (comp.unix.aix)
  • Re: rhost authentication
    ... >>I need do rsh without type password. ... of a .rhosts file in a home directory with the contents: ... Then only that person can rsh to the target machine. ... Trinity University ...
    (Fedora)