Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rsync from SCO 5.0.6 to Linux

13 views
Skip to first unread message

Bob Meyers

unread,
Oct 4, 2006, 11:14:06 PM10/4/06
to
Hello fellas,

I groped google but found no answer. I would like to be able to rsync
from a SCO OS 5.0.6 to a linux system, but the linux system does not
have rcmd and therefore it does not work.

Has anyone figured out how to rsync from SCO to Linux?

Brian K. White

unread,
Oct 5, 2006, 2:44:03 AM10/5/06
to

Several ways to do this.
I do it back & forth ll day every day.
There are only about a hundred different ways to use rsync so unfortunately
this will be a large email, because I want to answer the question strictly
as you asked it, but I also want to to show what I think is a much better
way. Then I also want to show what is probably the quickest for right now
even though it sacrifices speed and cpu usage etc...

The quickest for right now, at the cost of being slow and eating lots of
cpu, is to just use ssh instead of rcmd:
rsync -av --delete -e ssh /u/data linuxbox:/u

Thats because ssh is almost garunteed to be already there on the linux box.
Hopefully you have it on the sco box.
If you're on the linux box, most often rsync is compiled to use ssh by
default so you don't need -e ssh if you're on the linux box running rsync to
reach out to a sco box if that sco box has ssh.
This is also the most secure so if your doing something over the internet
you may want to use this way intentionally.
For automated processes you can use ssh keys instead of setting up
hosts.equiv and .rhosts

---------------

The strict answer to your question though is:
rcmd is called rsh on linux. it's probably not even installed by default,
let alone enabled.
Find rsh or rsh-server in your package manager and install it, then find it
in your system management util (on SUSE it's "yast", other distros have
their own) and enable it, and these days you'll probably have to edit the
firewall to allow it too.

Then from the sco box it would be:
rsync -av --delete -e rsh /u/data linuxbox:/u

Conversely, If you're on the linux box and need to reach out to the sco box
you have to specify -e rcmd

Also, In both cases above, if you're on the linux box contacting the sco
box, you may have to add "--rsync-path=/usr/local/bin/rsync" to the rsync
command line on linux. Assuming rsync is in /usr/local/bin on sco.

---------------

Now for the good stuff :)

Since I use rsync a lot, I actually always set up rsync as it's own service
so that I'm using rsync directly, no rcmd or rsh or ssh, no inetd or xinetd.
I find it a bit less work than setting up the user equivalency so that the
r-services (rcmd/rsh/rexec/rlogin/rcp) would work, and definitely runs
faster and is lighter weight than using ssh, and results in a simpler, more
efficient system.

On the linux box edit /etc/rsyncd.conf like this:
-----snip-----
uid = root
gid = sys
read only = false
#use chroot = true
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
#hosts allow = trusted.hosts
#slp refresh = 300
secrets file = /etc/rsyncd.secrets

[root]
path = /
auth users = root
-----snip-----

On the linux box, edit /etc/rsyncd.secrets like this"
-----snip-----
root:somepassword
-----snip-----

The password can be anything, it's completely unrelated to roots normal
password.

Now on the linux box enable & start the rsync service. Every distro has it's
own weird start script setup so I can't tell you how to do that. On SUSE you
can say "chkconfig rsyncd on" and that enables it to start at boot, and you
can say "rcrsyncd start" and that starts it up now. Or you can go into Yast
and find System, System Services (Runlevel), and activate the service via
the interactive utility.

One wrinkle here is, there is probably two places rsync shows up. One is as
it's own service with it's own rc start script, which makes it a stand-alone
server daemon. I happen to preferr that since I use it a lot and thats what
above does on SUSE. Also, my rsync package for sco includes an
/etc/init.d/rsync and sample /etc/rsyncd.conf & .secrets to set this up
easy.
on sco just: /etc/init.d/rsync enable, then /etc/init.d/rsync start.
http://www.aljex.com/bkw/sco/#rsync

But it may also show up ready to be turned on in xinetd, which means xinetd
will fire up rsync on-demand every time it senses a connection on the rsync
port, 873. Personally I don't like relying on xinetd too much. It's too
easily broken and it's an unnecessary complexity in this case. On SUSE this
shows up in Yast under Network Services, Network Services (xinetd), and then
there is a dialog with a list of services and you can check off rsyncd.

You can't enable it both ways at the same time, so when you are looking for
how to "enable a service" make sure you can tell which way it means, if you
care.

Now from the sco box use it like this:

To send a directory /u/data from sco to linux, be on the sco box and run
this:
rsync -av --del /u/data linuxbox::root/u

To pull a directory /u/zzz from linux to sco, be on the sco box and run
this:
rsync -av --del linuxbox::root/u/zzz /u

This assumes you are logged in as root, else you'd have to prepend "root@"
to the remote host in the rsync command
It will prompt you for a password, enter whatever you put in rsyncd.secrets

For automated processes you can set RSYNC_PASSWORD=whatever in the
environment.
Or you can put it right on the same line
RSYNC_PASSWORD=whatever rsync -av ...
Note, no semicolon between the password & rsync

rsync uses port 873 TCP when used this way so if you have firewalls or nat
routers between the boxes, that is the port you have to forward from outside
and/or open up in the firewall.

Brian K. White -- br...@aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

Bob Meyers

unread,
Oct 5, 2006, 2:14:14 PM10/5/06
to

On Oct 4, 11:44 pm, "Brian K. White" <b...@aljex.com> wrote:
> Several ways to do this.
> I do it back & forth ll day every day.

Thank you Brian! I'll study this. You know what? When I Googled for
"rsync to Linux" in comp.unix.sco.misc, I saw your name as a poster,
but all it displays under your name was a hyperlink, "show quoted text"
!

It was skipping all the text you posted. I am using Google's reader on
FireFox. Thankfully when you replied to mine I had to hit that "show
quoted text" link, and all was revealed.

Bob

Bob Meyers

unread,
Oct 5, 2006, 3:57:47 PM10/5/06
to

On Oct 5, 11:14 am, "Bob Meyers" <oregon...@gmail.com> wrote:
> On Oct 4, 11:44 pm, "Brian K. White" <b...@aljex.com> wrote:
>
> > Several ways to do this.
> > I do it back & forth ll day every day.

I used your recommended daemon option - worked like a charm! I can add
that on RedHat ES3 they use xinetd to start the rsync service, and its
script is in /etc/xinetd.d/rsync. If you turn on the service in
RedHat's tools it simply edits a "yes/no" flag in /etc/xinetd.d/rsync
script. I had to create /etc/rsyncd.conf and /etc/rsyncd.secrets as per
your example. Worked great. Your collection of tools on
http://www.aljex.com/bkw/sco/ look handy too - almost like having --
linux!

0 new messages