Skip to content

Instantly share code, notes, and snippets.

@RobinBoers
Created April 18, 2021 08:43
Show Gist options
  • Save RobinBoers/835425191e2f0c2eaefd7bd202801228 to your computer and use it in GitHub Desktop.
Save RobinBoers/835425191e2f0c2eaefd7bd202801228 to your computer and use it in GitHub Desktop.
Set the passwor for a user to a line from a big password file (in my case rockyou.txt)
(pwd=$(openssl passwd -1 "$(shuf -n 1 rockyou.txt)"); echo $pwd; echo $pwd) | passwd bob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment