AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

RCP error in AIX

  • 1.  RCP error in AIX

    Posted Wed December 29, 2010 07:45 PM

    Originally posted by: SystemAdmin


    I have a number of machines on various versions of AIX (5.3 TL6, TL7, and 6.1). RCP used to work from other AIX, Linux and Windows machines to all of them. (Note: our logins, DNS, etc... are all managed through a Windows server.)

    Recently, I made changes to the /etc/netsvc.conf and /etc/auto_master to get automounting working on these machines, which is now chugging along just fine. (Added hosts=local,bind in netsvc.conf.) However, that seems to have broken RCP. I know it's not anything with the .rhosts file, as it went from working for all users to working for none.

    From Linux, I get the error "rshd: 0826-826 The host name for your address is not known". However, I can rsh just fine, and nslookup works perfectly.

    From Windows, I'm getting "0826-813 Permission is denied" for both rcp and rsh.

    From AIX, I was getting the error "rshd: 0826-813 Permission is denied", but then I changed my .rhosts file to have the FQDN of the machines rather than just the hostname, and now it works on the TL6 machine, but on the newer OSs I'm getting the error "shell-init: error retrieving current directory: getcwd: cannot access parent directories: A specified file does not support the ioctl system call."

    (RCP still works fine to all Linux machines from all three platforms.)

    I'm assuming this is something to do with resolution, given the changes when I put in FQDN names, and the fact it broke when I changed netsvc.conf, but I'm stumped as to what to do next. Does anyone have any ideas?


  • 2.  Re: RCP error in AIX

    Posted Wed December 29, 2010 07:51 PM

    Originally posted by: SystemAdmin


    Also, to forestall the inevitable "you shouldn't use RCP" - the network in question is fully enclosed (no external access whatsoever), and no sensitive information is kept on it. Some of my developers like to use RCP because it's easy to put in scripts for their file transfers and they don't have to mess around with permissions afterwards when transferring from Windows to AIX. If someone has an alternative that meets the same requirements, I'm happy to listen. :-)


  • 3.  Re: RCP error in AIX

    Posted Thu December 30, 2010 11:26 AM

    Originally posted by: mmveiga


    I believe the right syntax for the /etc/netsvc.conf should be hosts=local,bind4, but I don't believe that is your problem.

    Did you try to nslookup the IP address of the client connecting to your RCP server to see what it resolves too ? My guess is that will be the full qualified domain name.

    You may also want to post more details, contents of /etc/resolv.conf and /etc/hosts from both client and server.

    On your second post you asked for suggestions to replace RCP, SSH (using SCP) is mine.

    Regards,
    Marcelo.


  • 4.  Re: RCP error in AIX

    Posted Thu December 30, 2010 05:05 PM

    Originally posted by: SystemAdmin


    "On your second post you asked for suggestions to replace RCP, SSH (using SCP) is mine. "

    In order to do this in a script, without hardcoding a password, would something have to be set up with keys on both ends? The developer would like to be able to do this from any machine just by putting that machine in his rhosts file, nothing more complicated than that...(We also don't have any SSH even set up on the server, since it's a completely protected zone, but something could be done if needed.)


  • 5.  Re: RCP error in AIX

    Posted Fri December 31, 2010 04:02 PM

    Originally posted by: mmveiga


    You can use files or key for authentication without passwords, key is better.
    A good resource is : http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1#AUTHENTICATION and the following page has information specific to AIX : http://www.ibm.com/developerworks/systems/articles/openssh_aix.html

    I hope this helps you.

    Regards,
    Marcelo.


  • 6.  Re: RCP error in AIX

    Posted Thu January 06, 2011 01:04 PM

    Originally posted by: SystemAdmin


    We're really hoping to get this working the way it was, and without installing additional software (we don't have SSH installed or use it at all on this system, since this network is isolated). But if we can't, I guess that's an alternative we'll have to look at. Thanks.


  • 7.  Re: RCP error in AIX

    Posted Thu December 30, 2010 05:08 PM

    Originally posted by: SystemAdmin


    "You may also want to post more details, contents of /etc/resolv.conf and /etc/hosts from both client and server."

    On the server, resolv.conf just has the nameserver address, and the domain name. /etc/hosts actually did have some hard coded entries, which I've now removed (the server didn't use to have the netsvc.conf set up to use bind, so I guess things were hard coded in a few places). I'm wondering if it was some sort of conflict here that was causing the problem - I'm going to remove those when I get the chance (the machine's in use currently) and see if that makes a difference.

    As for the client, the developer is mostly trying to do this from Windows machines, so those files do not exist.


  • 8.  Re: RCP error in AIX

    Posted Thu December 30, 2010 11:47 AM

    Originally posted by: garethr


    These errors look like file permission issues.

    On the "getcwd" one: Can the user that you're trying to rsh as actually cd to its home directory all the way from / ? I.e. without going through any directory owned by root and rwx------ or something.

    Are the permissions (as opposed to the content) of your configuration files correct?


  • 9.  Re: RCP error in AIX

    Posted Thu December 30, 2010 05:12 PM

    Originally posted by: SystemAdmin


    "On the "getcwd" one: Can the user that you're trying to rsh as actually cd to its home directory all the way from / ? I.e. without going through any directory owned by root and rwx------ or something."

    Yes, and these have not changed since things were working.

    "Are the permissions (as opposed to the content) of your configuration files correct?"

    By this, do you mean the .rhosts file, or something else? The .rhosts is 600, and again hasn't changed since things were working...


  • 10.  Re: RCP error in AIX

    Posted Fri December 31, 2010 04:57 AM

    Originally posted by: garethr


    Perhaps you should try using strace to run the rcp process, and watch the output for the error messages. When an error message appears, look back over the previous few kernel calls and you'll probably see a line showing a file "open" call which will return with an error. This might lead you to more insights.


  • 11.  Re: RCP error in AIX

    Posted Fri December 31, 2010 02:38 PM

    Originally posted by: SystemAdmin


    Hmmm...I don't appear to have strace installed. I'll track it down and go from there. (Although of course that doesn't apply to testing from the Windows machine, but hopefully the errors are the same...)


  • 12.  Re: RCP error in AIX

    Posted Fri December 31, 2010 03:26 PM

    Originally posted by: SystemAdmin


    Okay, I found one of our Linux machines with strace. Oddly, the error I get when I run rcp with strace (like even just the normal error on running the command, not the strace output) is different than the one I get when running it without. Does strace cause it to run differently?


  • 13.  Re: RCP error in AIX

    Posted Thu January 06, 2011 01:55 PM

    Originally posted by: SystemAdmin


    Well, removing the old hardcoded entries from the /etc/hosts file did the trick. Very odd. Thanks!