This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rcp doesn't work because of my UIDs?


Li_Adrian@emc.com wrote:
Here's my current situation:
I use PuTTY to access a UNIX box from my Windows box,
Hmm... You have Cygwin. Why not just use ssh? (Never understood why people want to get, install, configure and maintain multiple small Unix-like solutions like PuTTY and various commercial X servers like Reflection/X (especially since they may or may not play well together) when Cygwin has all of that already and it's much more Unix-like...)
and I want to be able to rcp from that UNIX box onto a Windows 2003 Server box, with Cygwin as it's porting system to UNIX.
Can you rsh from the Unix box to the Windows 2003 box? How about ssh? (<- Note some configuration may be required).
All RPC commands work, but when I use rcp,
What are "RPC commands"? Did you mean the "r" commands like rsh, rlogin, rcp, etc.?
I have to do it in the format of rcp test.txt username@xxx.xxx.xxx.xxx:/home/ and I have to find some way to be able to drop that username part.
The way to drop the username part is to use the same username at both ends.
So after talking to another person on the mailing list, we determined that I can't rcp using just the host's IP because of the difference in UIDs. When I found the UIDs of the computers, I found the UNIX UID to be 0, and Windows UID to be 500. Do you guys think that this is the cause? If so, how do I fix it?
Let's not start complicating matters by using root (UID 0) access on the Unix side. First try to get rsh access going between the two machines using your user ID. Or better yet set up ssh and get that working. ssh, unlike rsh, will prompt you for a password if necessary while rsh (rcp, etc) will just fail with an error message unless you've configured passwordless access. Not that passwordless access isn't possible, rather you might think that having one user masquerade as another would be the hardest to configure, especially when one of those users is a super user (UID 0). So again, let's not start with the most difficult configuration first!

Once you can [rs]sh between the two systems try the [rs]cp again, with the username being the same, thus not specified, then, if you must, try it with differing usernames. Again, scp will probably be better because if necessary it should prompt for a password though configuration of ssh/scp is more difficult, especially with 2003 Windows machines as they have tightened up security requirements. See the OpenSSH readme when you install OpenSSH in cygwin and look for set up scripts of ssh-host-config and ssh-user-config.

Finally, for an alternate solution(s), if all you're really doing is copying files from a Unix system to a Windows system have you considered making the file system on the Unix side a share by setting up Samba? Then you can:

$ cp //unixsvr/share/path/file /cygdrive/c/Windows

or (shrudder), simply have the application your running that needs these files access //unixsvr/share/path/file(s) (<- for any Cygwin programs/scripts or \\unixsvr\share\path\files(s) for Windows only programs...)
--
Andrew DeFaria <http://defaria.com>
One nice thing about egoists: They don't talk about other people.



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]