Operating System - HP-UX
1833741 Members
2836 Online
110063 Solutions
New Discussion

password rsync without root account

 
sapoguheman
Frequent Advisor

password rsync without root account

Hi Admins - 
 
I need your help for one of my production client which is syncing its file from Production Server to DR servers via rsync using root account.
 
Due to Compliance - Root Account will Be Disabled.
 
Is there any way where I can achieve the same level of functionality for the rsync script using sudo.
 
1 REPLY 1
mbarnwal
HPE Pro

Re: password rsync without root account

Rsync is an opensource tool and used more widely on Linux. You may find many solutions and workaround for this.

Following works on my system.

Assuming /tmp/test2 has files with root ownership and non-root users does not have any permissions for these.

Also, this assumes that root's ~/.ssh/id_rsa.pub on host1 is appended to user1's ~/.ssh/authorized_keys file on host2.

user1@host1 $ sudo rsync -p -v -r --rsync-path="sudo rsync" /tmp/test2 user1@host2:/tmp/

Regards

Manish

I am a HPE Employee