Microsoft KB Archive/324061

= HOW TO: Transfer by Means of RCP in a UNIX-to-Windows Migration =

Article ID: 324061

Article Last Modified on 6/25/2004

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Small Business Server 2000 Standard Edition
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q324061



IN THIS TASK
SUMMARY
 * Configuring the UNIX Host
 * Transfer a Single File
 * Transfer a Whole Directory

REFERENCES



SUMMARY
The remote copy (RCP) tool is a standard UNIX tool and a Microsoft Windows 2000 tool. You can use this tool to transfer a file and recursively transfer the whole directory between two computers.

back to the top

Configuring the UNIX Host
Before you can use the RCP tool from a Windows-based computer, you must turn on the RCP service and update the security files to allow the Windows-based computer to connect to your computer over this service.

To turn on the RCP service by using inetd:
 * 1) Log on to the computer as root.
 * 2) Edit the file /etc/Inetd.conf.
 * 3) Uncomment the lines that start with shell and that start with exec.
 * 4) Save the file.
 * 5) Send the Host User Profile (HUP) signal to inetd by using kill or by using pkill. Use ps to determine the process ID.
 * 6) Run inetd again.

To turn on the RCP service by using xinetd:
 * 1) Log on to the computer as root.
 * 2) Edit the file /etc/Xinetd.d/rsh.
 * 3) Change the line disable to no.
 * 4) Save the file.
 * 5) Send the HUP signal to xinetd by using kill or by using pkill. Use ps to determine the process ID.
 * 6) Run xinetd again.

You must now set the security permissions to allow the Windows host to connect to your computer:
 * 1) Edit the file /etc/Hosts.equiv.
 * 2) Add a line that contains the name of your Windows host.
 * 3) Add a second line that contains the name of your Windows host and the name of a user who can access the directory that you want to transfer. Separate the two elements with a tab character.
 * 4) Save the file.

NOTE: To transfer files from some UNIX computers, you must log on to the Windows-based computer as the user that you set in the file Hosts.equiv.

back to the top

Transfer a Single File
To transfer a single file, you must supply the hostname, the username, the path of the source file, and the path of the destination file that you want the file copied to. For example, to copy the file Index.html from the path /usr/local/htdocs on the computer unixhost as the user webuser you must use:

rcp unixhost.webuser:/usr/local/htdocs/index.html index.html

back to the top

Transfer a Whole Directory
To transfer a whole directory, which includes all of the directory contents and subdirectories, add the -r command line option to the command. For example, to copy the whole Htdocs directory from your UNIX computer to the directory C:\inetpub\unixweb you must use:

rcp -r unixhost.webuser:/usr/local/htdocs C:\InetPub\UnixWeb

back to the top

