From: martin@piware.de <> Date: Wed, 16 Sep 2009 13:27:59 +0000 (+0200) Subject: postinst-setup: do not track passwd/shadow any more X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=4aecaff49cc512735e95ae06d29c674bc753fdd8;p=bin.git postinst-setup: do not track passwd/shadow any more --- diff --git a/postinst-setup b/postinst-setup index 2b74f97..079cc5d 100755 --- a/postinst-setup +++ b/postinst-setup @@ -25,7 +25,8 @@ fi # completely cd /etc if [ ! -d /etc/.bzr ]; then - for i in passwd group shadow fstab; do + #for i in passwd group shadow fstab; do + for i in fstab; do [ -e $i.originst ] || cp $i $i.originst done [ -e /backup-etc ] || bzr get bzr+ssh://martin@piware.de/home/martin/backup/`hostname`-etc /backup-etc @@ -33,27 +34,27 @@ if [ ! -d /etc/.bzr ]; then cp -av /backup-etc/.bzr/ /etc/ rm -rf /backup-etc chmod 600 /etc/ssh/ssh_*_key - chmod 640 /etc/shadow - chown root:shadow /etc/shadow + #chmod 640 /etc/shadow + #chown root:shadow /etc/shadow chmod 700 /etc/ssl/private chmod 640 /etc/ssl/private/ssl-cert-* chown root:ssl-cert /etc/ssl/private/ssl-cert* # only restore dchroot part into fstab - grep -A 200 "^# sid chroot" fstab >> fstab.originst || true + grep -A 200 "^#.*chroot" fstab >> fstab.originst || true mv fstab.originst fstab # only restore the human users from passwd/group - for i in passwd group; do - perl -naF: -e 'print if $F[2] > 1000 && $F[2] < 60000' $i >> $i.originst - mv $i.originst $i - done + #for i in passwd group; do + # perl -naF: -e 'print if $F[2] > 1000 && $F[2] < 60000' $i >> $i.originst + # mv $i.originst $i + #done # only restore some passwords from shadow - egrep 'martin|netti|joe' shadow >> shadow.originst - mv shadow.originst shadow - chown root:shadow shadow - chmod 640 shadow + #egrep 'martin|netti|joe' shadow >> shadow.originst + #mv shadow.originst shadow + #chown root:shadow shadow + #chmod 640 shadow fi # update postfix for new configuration