Copiying /etc/shadow with sudo and rsync
wayned at samba.org
Tue Nov 24 21:34:32 MST 2009
On Tue, Nov 24, 2009 at 1:49 AM, Gerard Mensoif <mensoif_gerard at yahoo.fr>wrote:
> rsync --rsync-path='sudo rsync' --rsh='/usr/bin/ssh -x' --archive
> user at localhost:/etc/shadow user at server2:/etc/shadow
One end of the transfer has to be local (even a host named "localhost" is
not local), so one thing you can do is to use two rsync commands (pull, then
push). Or just make sure that the sending side of the transfer is running
rsync as root (e.g. use sudo to run the local rsync too).
Also, a modern rsync would have exited with an error about your invalid
two-server syntax, so you may wish to upgrade to something newer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync