Date: Wed, 18 May 2005 14:27:34 -0400 From: Vivek Khera <vivek@khera.org> To: freebsd-stable@freebsd.org Subject: rdist6 won't let root use ssh transport Message-ID: <A8D01A9B-095B-446A-B1A3-86197A669D7B@khera.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8D01A9B-095B-446A-B1A3-86197A669D7B>