Do I forget something. I'm running SCO6.
Regards,
John
Well, first things first, why in the name of all the seven heavens are
you using rcp or rsh? Why aren't you using SSH, which SCO 6 supports?
That said, 'rcp' is a nasty tool because it mis-handles symlinks and
hardlinks. scp has the same problem, although it far safer handling of
remote access due to the availability off SSH keys. But instead, if
possible, install rsync and use 'rsync -e ssh -avH' to do the
transfers: that will preserve not only ownership, but other file
characteristics such as hard-links, and is often vastly more efficient.
First, I don't run SCO6 so this is specific to Open server and should work
on SCO6 unless they have some permission setting that I am not aware of.
Usually when rcp fails the permissions on /.rhosts is not correct. It should
be 400.
# ls -lta /.rhosts
-r-------- 1 root sys 68 Aug 25 15:22 /.rhosts
# cat /.rhosts
unix root <-- local machine
unix2 root <-- remote machine
unix586 root
#
Use the same .rhosts file on each machine, adjust as necessary for
your site.
Be sure that you can ping each machine from the other machine by
the name listed in /.rhosts and the ping lists the machine name
as well as the ip address.
# ping unix2
PING unix2 (192.168.110.239): 56 data bytes
64 bytes from unix2 (192.168.110.239): icmp_seq=0 ttl=64 time=1.422 ms
Rcp/rcmd/rlogin must be able to match the incoming ip address with a
host name it can resolve to a name listed in /.rhosts. Rlogin from
one machine to the other (supply password if prompted) and use who -x:
# who -x
root ttyp0 Oct 5 11:16 unix
If you get an IP address instead of the hostname of the remote machine
your DNS, /etc/hosts, or /etc/resolv.conf is not configured correctly.
If pinging one or the other machine results in a foreign IP address,
flush the ARP cache on both machines and try again.
arp -F
The above makes root on one machine equivalent to root on the second
machine. Some people may complain about security issues (large
organization, separate machine in accounting, engineering, HR,
etc.) but in a small company with one system admin: Not a problem.
Rcp will not preserve owner, permissions, modification time, etc.,
to keep them use a cpio pipeline:
find /target_directory_from root -depth -print | cpio -oca | rcmd machine_two cpio -icvmd
If you have enough disk space, and if the resulting cpio archive is less
then 2G you can use cpio to create a transfer file, rcp the transfer file
and then use cpio to extract the files.
cd /source_directory
find . -depth -print | cpio -ocv -O /tmp/transfer.cpio
rcp /tmp/transfer.cpio machine_two:/tmp
rlogin machine_two
cd to /where_ever_you_need_to_put_the_files
cpio -icvmd[u] -I /tmp/transfer.cpio
OR
Make a list of the specific files needed to be moved and use
the list to create /tmp/transfer.cpio:
cd /source_directory
ls -lt > /tmp/cpio.list
vi /tmp/cpio.list
delete lines (file names) not required
delete all but the last column of the ls -l listing to have
only the file names.
cat /tmp/cpio.list | cpio -oca -O /tmp/transfer.cpio
There are many ways to skin this cat, and reasons to do it one
way or the other. Only you know what's right for you.
>
> Regards,
> John
>
>
--
Steve Fabac
S.M. Fabac & Associates
816/765-1670
Regards,
John
Nico Kadel-Garcia schreef: