September 18, 2014
 
 
RSSRSS feed

Distribute /etc/passwd among several machines securely

Use rsync and ssh as a cron job

  • October 26, 1999
  • By James Andrews
Add this line to cron:
0,10,20,30,40,50 * * * * /usr/local/bin/rsync -e /usr/local/bin/ssh -a /etc/passwd /etc/shadow /etc/group snoopy:/etc/
.

You will need to install ssh and rsync packages. This cron command runs every 10 minutes. "snoopy" is the name of the remote host, which should be set up to allow remote root ssh without prompting.

You could, of course, use NIS for this, but for simple setups this could be more efficent and easy to secure.
Sitemap | Contact Us