Skip to content

Instantly share code, notes, and snippets.

@marhan
Created May 9, 2017 21:17
Show Gist options
  • Save marhan/444d4dd2ba2e01174903042d2d1258e8 to your computer and use it in GitHub Desktop.
Save marhan/444d4dd2ba2e01174903042d2d1258e8 to your computer and use it in GitHub Desktop.
Creates a linux user without interaction
#!/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