Jeff Terrell

Jeff Terrell
Ph.D. Candidate
Department of Computer Science
University of North Carolina at Chapel Hill

jsterrel AT cs.unc.edu
(919) 962-1791 (office)

rsh fails

Setup

I was on a FreeBSD 2.2.8 machine, foxy, attempting to rsh as root to a FreeBSD 5.1 machine, chewie. chewie:/root/.rhosts contains foxy root.

Symptoms

When I specified a command, rsh fails. If I did not specify the command, I was logged in to chewie as root without being prompted for a password.

foxy # rsh chewie hostname
rshd: Login incorrect.

foxy # rsh chewie
Welcome to chewie!
chewie #

Background

The ~/.rhosts file specifies a list of remote host/remote user pairs which are trusted; rsh does not prompt such remote host/user pairs for a password. rshd calls rlogind if there is no command specified. Otherwise, it handles the authentication.

Resolution

The pam_rhosts(1) manpage details an allow_root option. Simply add allow_root to the end of the relevant line in /etc/pam.d/rsh.

-auth required pam_rhosts.so no_warn
+auth required pam_rhosts.so no_warn allow_root

articles/rsh-fails.php: Last Modified: 12/03/07@18:01:43 | Size: 1469 bytes | View Source