Guys - I want to place the following cron job in my server so it can mirror the primary server which users constantly modify on a daily basis but I would like this to be done via CRON at night rather than me having to manually type these commands but when I issue the command as a test, it prompts me for a password which I can understand via SSH access to the machine but what happens if I place this in CRON, will it not run if nobody is there to enter the password? Is there a secure and trusted way to do this?
Code:
0 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/etc/passwd /etc
1 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/etc/shadow /etc
2 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/etc/group /etc
3 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/home /
4 2 * * * rsync --delete -avz -e ssh root@10.1.1.24:/share /