Created
May 9, 2017 21:17
-
-
Save marhan/444d4dd2ba2e01174903042d2d1258e8 to your computer and use it in GitHub Desktop.
Creates a linux user without interaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
password="develop" # your chosen password | |
crypted_password=$(perl -e 'printf("%s\n", crypt($ARGV[0], "password"))' "$password") | |
sudo useradd -m -p $crypted_password -s /bin/bash developer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment