1823144 Members
3630 Online
109647 Solutions
New Discussion юеВ

rcp problem

 
SOLVED
Go to solution
peterchu
Super Advisor

rcp problem

I have two hosts -A & B
host A can rcp file to host B by root a/c
rcp abc.txt root@hostB:/tmp --> it is Ok

but can't rcp file to host B by other user

rcp abc.txt user@hostB:/tmp ,
Permission denied.

I have updated the hostB ~user/.rhosts

#vi ~user/.rhosts
+ +
hostB user

but still not work , could suggest what is the problem ? thx
8 REPLIES 8
peterchu
Super Advisor

Re: rcp problem

but very strange , the user can rlogin from hostA to hostB , but can't rcp , could suggest what is wrong ? thx
Sunil Sharma_1
Honored Contributor
Solution

Re: rcp problem

do you have this line in /etc/inetd.conf

shell stream tcp nowait root /usr/lbin/remshd remshd

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
RAC_1
Honored Contributor

Re: rcp problem

What are the perms on .rhosts file?? Do not put ++, just put hostA root.

Try and post.

Anil
There is no substitute to HARDWORK
Jose Mosquera
Honored Contributor

Re: rcp problem

Hi,

You must need create .rhost file into the each $HOME directory of users requested by the rcp.

Rgds.
Bharat Katkar
Honored Contributor

Re: rcp problem

Hi,
I think Permissions on the File being Copied by rcp should also matter.
Regards,
You need to know a lot to actually know how little you know
peterchu
Super Advisor

Re: rcp problem

thx replies , I hv checked all your suggests , but still can't find the reason . thx
doug mielke
Respected Contributor

Re: rcp problem

it depends on whether a regular user, or root is trying to run the rcp, but either make entries in .rhosts in the target users home directory, or in the /etc/hostsequiv file.

Muthukumar_5
Honored Contributor

Re: rcp problem

For root users, /etc/hosts.equiv file will not validated there. r* commands will try to use /$HOME/.rhosts file if there without checking /etc/hosts.equiv. If it is there then only it will check that file.

But for normal users it is vice versa there.
You have to define in /etc/hosts.equiv file access there first then only that user file .rhosts there.

Try to look on /etc/hosts.equiv file on both hosts there. If you are having permission there only it will go to $HOME/.rhosts file there.

see man hosts.equiv file.

Try to put on /etc/hosts.equiv as

hostA
hostB +

hostB
hostA +

it will make it r* commands to work.

HTH.
Easy to suggest when don't know about the problem!