summaryrefslogtreecommitdiffstats
path: root/debian/passwd.cron.daily
blob: 4778bf090fedd10b7d4b80bed389a57eb149c3b5 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

cd /var/backups || exit 0

for FILE in passwd group shadow gshadow; do
        test -f /etc/$FILE              || continue
        cmp -s $FILE.bak /etc/$FILE     && continue
        cp -p /etc/$FILE $FILE.bak && chmod 600 $FILE.bak
done