Raymii.org
Quis custodiet ipsos custodes?Home | About | All pages | Cluster Status | RSS Feed
Create /etc/shadow crypted password entries
Published: 23-09-2016 | Author: Remy van Elst | Text only version of this article
❗ This post is over eight years old. It may no longer be up to date. Opinions may have changed.
These small snippets create password strings you can put in /etc/shadow
when
you need to reset a password on a system.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!
Perl
perl -e 'print crypt("password","\$6\$salt\$") . "\n"'
Replace password
with the password, and salt
with the salt. Need some random
stuff for the salt? openssl
helps:
openssl rand -base64 10
iDaorRK/57YZfQ==
mkpasswd
On Ubuntu/Debian, install the whois
package. On Arch, install debian-whois-
mkpasswd
from the AUR.
mkpasswd -m sha-512 password salt
OpenSSL
If you need an older style crypt
password you can use OpenSSL:
openssl passwd -1 -salt salt password
Tags: crypt
, mkpasswd
, perl
, shadow
, snippets
, whois