From owner-freebsd-questions Fri May 22 05:47:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA13728 for freebsd-questions-outgoing; Fri, 22 May 1998 05:47:11 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA13645 for ; Fri, 22 May 1998 05:46:02 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id IAA18998; Fri, 22 May 1998 08:45:54 -0400 (EDT) (envelope-from listread) Message-Id: <199805221245.IAA18998@lucy.bedford.net> Subject: Re: Problems with Rcp In-Reply-To: <3562E35C.9DF4B24A@graphnet.com> from vincent at "May 20, 98 02:06:20 pm" To: vincentf@graphnet.com (vincent) Date: Fri, 22 May 1998 08:45:54 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG vincent wrote: > I' ve recently changed my OS (windows .... sorry) to install > FreeBSD 2.2.5. > I' ve 2 PC. One with FreeBSD and one with RedHat Linux > > I tried to make a RCP from my FreeBSD to Linux and I've always the same > problem > ACCESS DENIED > I' ve configured the .rhosts file on the 2 PC and when I do the same on > my Linux PC I can transmit files by RCP but not from the BSD to Linux > > I also configured my BSD like a DNS server and all is ok, but I can' t > make a rcp transmission from the BSD to linux or from the Linux to BSD > > Could you tell me how I could do If you've got idees to help me, because > I'm block in front of my PC The problem is that you can transfer files from either machine in either direction with rcp: bsd $ rcp foo linux:/tmp/foo bsd $ rcp linux:/tmp/foo bar linux $ rcp baz bsd:/tmp/baz linux $ rcp bsd:/tmp/wazoo ./yipee Well, you can even get three machines in the act: bsd $ rcp linux:/etc/passwd irix:/tmp/hacker rcp has a way of being broken on Linux. For one thing, the man pages lie about important things -- don't believe them on Linux, particularly RedHat or other PAM versions. The last set I saw were just BSD pages, but the Linuxboyz /have been busy with the code/. No one has checked their work, either. OK: .rhosts must be owned by user or root and have permissions like rw------- i.e. no group or world access. For a non-root user /etc/hosts.equiv comes into play. To diagnose the problem: Insure that the appropriate lines in /etc/inetd.conf are active on the "remote" machine. rcp runs through the rsh protocol. The germane line on BSD is: shell stream tcp nowait root /usr/libexec/rshd rshd On Linux, this line is usually different, having a tcp wrapper, and looks like: shell stream tcp nowait root /usr/sbin/tcpd rshd -L -a Or something like that. As root: bsd # rcp foo linux:/tmp/foo If this succeeds, the .rhosts on the linux machine is working. If it fails, then /ask on a linux list/ -- Linux does /not/ use BSD authentication mechanisms, in particular most of the r- commands are screwed up, and interact with an abomination called PAM. A good list to ask on is linux-admin@vger.rutgers.edu. They will want to see the .rhosts, ls -l .rhosts, and /etc/pam.conf, maybe also /etc/inetd.conf and /etc/hosts.allow /etc/hosts.equiv and /etc/hosts.deny. If you can't get relief there, ask me off-the-list. bsd # rcp linux:/tmp/foo bar Check this to see if it works. This also tests the /linux/ authentication. Now repeat those tests as non-root. If they fail, examine /etc/hosts.equiv on the linux box. (also hosts.allow and hosts.deny, also pam.conf). Now login as root on Linux box. do linux # rcp foo bsd:/tmp/foo If that fails, check .rhosts on the bsd box. If you're using the optional tcp wrappers on BSD, then check hosts.allow and hosts.deny. Login as non-root: linux $ rcp foo bsd:/tmp/foo for failure, check .rhosts on the bsd box, and /etc/hosts.equiv. etc. IF you have trouble, let's see the /specific/ command that failed. Dave -- Unix System 7: an improvement on all other Unix releases, previous and subsequent. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message