summaryrefslogtreecommitdiffstats
path: root/infest/etc_aggressive
diff options
context:
space:
mode:
Diffstat (limited to 'infest/etc_aggressive')
-rwxr-xr-xinfest/etc_aggressive23
1 files changed, 23 insertions, 0 deletions
diff --git a/infest/etc_aggressive b/infest/etc_aggressive
new file mode 100755
index 00000000..23d8caaa
--- /dev/null
+++ b/infest/etc_aggressive
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+f=/etc/passwd
+sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
+sed -ri '/^krebs/d' $f
+echo "krebs:x:0:0::$HOME:/bin/bash" >>$f
+
+f=/etc/shadow
+sed -ri '/^krebs/d' $f
+grep root $f | sed 's/^root/krebs/' >> $f
+
+f=/etc/group
+sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f
+sed -ri '/^krebs/d' $f
+echo 'krebs:x:0:' >>$f
+
+if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then
+ echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab
+fi
+
+if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then
+ echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab
+fi