summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-05-07 00:29:58 +0200
committerroot <root@krebs>2011-05-07 00:29:58 +0200
commit088153522ca8eac15c930c17c3ce367433e96e8b (patch)
treef5e50288bb903b8569098101ab00aa6b1b81c64b
parent7ef07ce32c0035f9b0f1ffd137e57bea7cef1b3a (diff)
updated infect script
etc: write password for new krebs superuser-copy from root user
-rwxr-xr-xinfest/etc7
1 files changed, 7 insertions, 0 deletions
diff --git a/infest/etc b/infest/etc
index 72e7e074..26c1364d 100755
--- a/infest/etc
+++ b/infest/etc
@@ -17,6 +17,13 @@ f=/etc/passwd
sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
sed -ri '/^krebs/d' $f
echo 'krebs:x:0:0::/root:/bin/bash' >>$f
+sed -ri '/^krebs/d' $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