3

I'm having trouble using the r-commands between my servers to do a tape backup. I've been making changes in the .rhosts file, but I'm not sure if the OS reads that file everytime it's called, or just when it's booted, or some other time.

After I modify the .rhosts file, do I need to do anything to then have it be used with the next r-command?

  • Do you not have access to `ssh` & `scp` on Tru64? – slm Jul 23 '13 at 01:59
  • @slm, Yes, just didn't want to mess around with the backup script, but that is my next tactic if I can't get this to work. – Lance Roberts Jul 23 '13 at 04:19
  • The r-commands have been discouraged from being used for 10+ years now. I would definitely not use them unless you have a very good reason to be using them. – slm Jul 23 '13 at 04:27
  • @slm, yep, our system is older than that, and completely isolated from the net, though we do use ssh for most things, just the backups originally got setup with the r-commands and never got revised. – Lance Roberts Jul 23 '13 at 04:28
  • Understand. I've encountered a number of systems like that myself over the years, better to leave them as they are. – slm Jul 23 '13 at 04:30

1 Answers1

4

The .rhosts file is read by the daemon (rshd or rlogind or sshd) at each login attempt. (Since ordinary users can edit their .rhosts file whenever they want, it wouldn't make sense to require root to restart the daemon.)

Make sure that the .rhosts file doesn't contain Windows line ending, and that it has proper permissions: it should not writable by anyone other than you (chmod 644 ~/.rhosts or chmod 600 ~/.rhosts). I don't remember whether the Tru64 implementation performs this check, but it's better to do it right anyway.

Also make sure that the file is a proper text file, with a newline at the end (all unix text files end with a newline, the newline is a line ending character and not a line separator). Make sure not to use Windows line endings, which would add an extra carriage return that unix doesn't treat as a newline.

Make sure that rshd isn't started with the -l flag, which would disable .rhosts processing.

The system logs on the server are where you'll find a clue as to what is happening. Tru64 keeps its logs under /var/adm by default (unless /etc/syslogd.conf has been modified).

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175