*BSD News Article 17167


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!uwm.edu!cs.utexas.edu!uunet!psgrain!ee.und.ac.za!hippo.ru.ac.za!ucthpx!casper.cs.uct.ac.za!gimli!root
From: root@gimli.cs.uct.ac.za (Sandi Donno)
Subject: Re: How to setup .rhosts file so that root can rsh
Message-ID: <root.740129425@gimli>
Sender: news@cs.uct.ac.za (news)
Organization: Computer Science Department, University of Cape Town
References: <1993Jun15.021831.5246@mnemosyne.cs.du.edu>
Date: Tue, 15 Jun 1993 07:30:25 GMT
Lines: 27

In <1993Jun15.021831.5246@mnemosyne.cs.du.edu> smace@nyx.cs.du.edu (Scott Mace) writes:

>How do you setup the .rhosts /etc/hosts.equiv , etc. so that root
>on one machine can rsh [command] without a password.  also this
>is needed for rcp.  All I get is permission denied.
>I tried putting the local and remote machines names in the /.rhosts ~/.rhosts
>/etc/host.equiv with no luck.

You first have to change /usr/libexec/rlogind to allow root rsh's.

/usr/src/libexec/rlogind/rlogind.c:

do_rlogin(host)
	 char *host;
{
	...
	if (pwd->pw_uid == 0)
		return(ruserok(host, 1, rusername, lusername));
	/* return(-1); */
	return(ruserok(host, 0, rusername, lusername));
}

Then, you need to put the root-equivalent machine names in 
/root/.rhosts, not /.rhosts.
--
Sandi Donno
sandi@cs.uct.ac.za