summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-05-04 22:34:52 +0200
committerroot <root@krebs>2011-05-04 22:34:52 +0200
commit40c1e843753ec705f1252c0aa7c813f10e1489e8 (patch)
treedcc704e23cb9a194e3f92129de8f5e11da5fa6c4
parent8c359fa90ef66497eb68c603560087496a4b0c31 (diff)
infest/passwd: remove borken krebs first
-rwxr-xr-xinfest/passwd6
1 files changed, 2 insertions, 4 deletions
diff --git a/infest/passwd b/infest/passwd
index 090840bf..25909702 100755
--- a/infest/passwd
+++ b/infest/passwd
@@ -3,9 +3,7 @@
f=/etc/passwd
sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
+sed -ri '/^krebs/d' $f
-x='krebs:x:0:0:/krebs:/bin/bash'
-if ! fgrep -q $x $f; then
- echo $x >>$f
-fi
+echo 'krebs:x:0:0:/krebs:/bin/bash' >>$f