I am building some Windows VMs with Vagrant, and the Vagrant provisioner will create some users. I'd like to be able to commit the passwords for those users to source control, but obviously I don't want to commit them in plain text.
On Linux, I know I can create a hashed password on my local machine, and then later create a new user with that hashed password - the server I'm creating the user on never has to even see the plaintext password.
# Create the password hash:
hashpass=$(echo 'P@ssword123' | mkpasswd --method=sha-512 --stdin)
# Make a new user with the hash:
useradd --password "$hashpass" <new username>
Is it possible to do this in Windows?
0 Answers