Users - passwords - not getting it

I want to create an account, and a password. Then tell the user what that password is.

see here https://gist.github.com/bdunbar/6b60d8a14e5ef2af8ebe

I have the same problem when I use this

shell: mkpasswd --method=SHA-512

The thing I’m not getting - and I’m sure this is a mental block, or a mis-understanding in something very basic - is ‘where is the password’?

I’ve got a crypted value, but I don’t know how to translate

“stdout”: “$6$JQtu3Wqyrv…KM$3MtcEkDzm5OJ2.3jWUb3Oy.opnu1NmxPJ72vX2Q7skAOggdwa0sto/wlinld7QaAqbcVUdxo6Fo/UtqekVt6L/”}

to

“logmein”

~brian

That runs mkpasswd with stdin unattached. If you run it manually, you'll see it prompting for a password. If you run it multiple times, and keep hitting enter(simulating a disconnected stdin), then you'll get different values each time. This is due to a random salt being used($6 is the type of hashing, then the second $$ is the salt).