Copiying /etc/shadow with sudo and rsync

2009-11-24 Thread Gerard Mensoif
Hello, I have 2 server, which must rsync some files, including /etc/passwd and /etc/shadow. Everything was working fine until we decided to forbid rootlogin on the server, and use sudo for the sync. My problem is that /etc/shadow has a file permission of 400, so the non privilegd user can not

Re: Copiying /etc/shadow with sudo and rsync

2009-11-24 Thread Wayne Davison
On Tue, Nov 24, 2009 at 1:49 AM, Gerard Mensoif mensoif_ger...@yahoo.frwrote: rsync --rsync-path='sudo rsync' --rsh='/usr/bin/ssh -x' --archive u...@localhost:/etc/shadow u...@server2:/etc/shadow One end of the transfer has to be local (even a host named localhost is not local), so one thing