如何在命令行上创建 SHA-512 密码哈希
mkpasswd_example.sh
mkpasswd -m sha-512要直接在命令行上传递密码(注意:密码将在 shell 历史中可见):
mkpasswd_pipe_example.sh
echo "mypassword" | mkpasswd -m sha-512 --stdin如果你缺少 mkpasswd 命令,可以使用以下命令安装:
install_whois.sh
sudo apt install whois示例输出
mkpasswd_output.txt
$6$hcGoahD4HKwRtkE8$m72NDqN0ePCRrUDorWS40Jl73sG0Rr2LVWHNAPh5MwHB2Lk1NTVIn8Lg7W.NK/rIkwqiJzttM9IJ.N5L74Gbn1Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow