Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Manually generate password for /etc/shadow

I need to manually edit /etc/shadow to change the root password inside of a virtual machine image.

Is there a command-line tool that takes a password and generates an /etc/shadow compatible password hash on standard out?
by

1 Answer

Bharatgxwzm
(md5, sha256, sha512)
openssl passwd -6 -salt xyz  yourpass

Note: passing -1 will generate an MD5 password, -5 a SHA256 and -6 SHA512 (recommended)

Login / Signup to Answer the Question.