Skip to content

Instantly share code, notes, and snippets.

@JensRantil
Created September 22, 2015 12:55
Show Gist options
  • Save JensRantil/ac691a4854a4f6cb4bd9 to your computer and use it in GitHub Desktop.
Save JensRantil/ac691a4854a4f6cb4bd9 to your computer and use it in GitHub Desktop.
Script to generate salted SHA512 /etc/shadow password on/for Ubuntu 12.04 LTS
#!/bin/bash
read -p "Enter username: " username
read -s -p "Enter password: " mypassword
echo
echo -n $username:$mypassword | chpasswd -S -c SHA512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment