Created
December 1, 2017 14:49
-
-
Save seandavi/f984fa4601c2e854e540c2867ea640c2 to your computer and use it in GitHub Desktop.
Add new user to linux machine non-interactively
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
# I often want to add new users | |
# to AWS machines in a semi-automated | |
# script, perhaps via SSH. Doing | |
# so noninteractively took some search | |
# work. | |
sudo useradd USERNAME | |
echo "USERNAME:NEWPASSWORD" | sudo chpasswd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment