Using onnode as non-root ssh user
martin at meltin.net
Thu Oct 20 00:53:39 UTC 2016
On Wed, 19 Oct 2016 14:35:45 -0500, Steve French <smfrench at gmail.com>
> I noticed that onnode can be very useful for executing a command on
> all nodes in a cluster, but relies on ssh and in particular connecting
> as root. Unfortunately the user root may be disabled in some
> configurations. Is there a way to get onnode to ssh as an admin user
> other than root? is there a way to pass ssh parms to onnode
> automatically (password or key file etc.)?
Right now there is no supported way of doing that. However...
* onnode reads the CTDB configuration
* onnode currently respects an undocumented SSH variable
With the current onnode code, I think you could set:
SSH="ssh -n -l adminuser"
You would want to test to see if this works reliably for both
normal and parallel (i.e. with "onnode -p").
Perhaps we should change this variable to something like
CTDB_ONNODE_SSH and document it. However, we should work out the
case below first.
* "onnode -P" (push files) doesn't respect the SSH variable
I think it could be made to do this by passing the value of $SSH to
rsync's -e option. This would require some playing.
You could hack onnode to try out the above ideas...
peace & happiness,
More information about the samba-technical