-newaliases
-/etc/init.d/postfix restart
-
-# install users
-cat <<EOF >> /etc/passwd
-joe:x:1001:1001:Joe User,,,:/home/joe:/bin/bash
-netti:x:1002:1002:Annett Kittel,,,:/home/netti:/bin/bash
-EOF
-cat <<EOF >> /etc/shadow
-joe:$1$7t1pZTyL$lI7.B/9DtPa6y2BD8wTNZ/:13060:0:99999:7:::
-netti:$1$5uq6X7u0$92yOfMH2Nh89Ui.hbaEDp/:12930:0:99999:7:::
-EOF
-cat <<EOF >> /etc/group
-joe:x:1001:
-netti:x:1002:
-EOF
-
-for g in cdrom audio video plugdev scanner; do
- for u in joe netti; do
- adduser $u $g
- done
+# 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