rdist6 won't let root use ssh transport
Vivek Khera
vivek at khera.org
Wed May 18 11:27:35 PDT 2005
I use rdist regularly to manage a rack full of systems' configuration
files. FreeBSD 5 doesn't include the stock rdist anymore, so I'm
migrating my processes to use the rdist6 port. However, it seems
that if you run rdist6 as root, it ignores the -P /usr/bin/ssh flag
an tries to use rcmd directly, which fails since my target systems do
not have that service running. It works fine with ssh when running
as non-root.
Here's the relevant difference in output from a run as root vs. a run
as myself with the same arguments: "rdist6 -D -P /usr/bin/ssh -c /tmp/
update5 bkp-prv:"
run as me:
lorax: [readchild(bkp-prv, 20647, 3) got 289 bytes]
bkp-prv: doarrow(80a9220, bkp-prv, 0) start
bkp-prv: makeconn(bkp-prv)
bkp-prv: updating host bkp-prv
bkp-prv: Created notify temp file '/tmp//rdistx7HyCS'
bkp-prv: local user = vivek remote user = vivek
bkp-prv: Remote command = 'rdistd -S'
bkp-prv: Remote shell command = '/usr/bin/ssh'
lorax: [readchild(bkp-prv, 20647, 3) write done]
lorax: readchild(bkp-prv, 20647, 3) done: amt = -1 errno = 35
lorax: waitup() end
run as root:
lorax: [readchild(bkp-prv, 59981, 3) got 293 bytes]
bkp-prv: doarrow(80a9250, bkp-prv, 0) start
bkp-prv: makeconn(bkp-prv)
bkp-prv: updating host bkp-prv
bkp-prv: Created notify temp file '/tmp//rdistu9PVSb'
bkp-prv: local user = root remote user = root
bkp-prv: Remote command = 'rdistd -S'
bkp-prv: I am root, using rsh, therefore direct rcmd
lorax: [readchild(bkp-prv, 59981, 3) write done]
lorax: readchild(bkp-prv, 59981, 3) done: amt = -1 errno = 35
lorax: waitup() end
the root run then never finishes since the remote command never
actually runs. ssh as root works just fine otherwise, and also with
the rdist from FreeBSD 4 as root.
rdist6 -V: Version 6.1.5 (RELEASE) - Protocol Version 6, Release 6.1,
Patch level 5
Is there something I'm missing? I don't see anything in the man page
indicating that root can't run rdist6 with -P flag.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
More information about the freebsd-stable
mailing list