thinrasp/etc_org/cron.daily/passwd

10 lines
249 B
Plaintext
Raw Permalink Normal View History

2019-11-26 21:36:24 +01:00
#!/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