如何让 'htpasswd' 在 stdout 上打印哈希密码
你可以使用 htpasswd 的 -n 标志使其将哈希密码打印到 stdout 而不是写入文件。
htpasswd_examples.sh
htpasswd -n username或者,如果你想使用命令行上给出的密码:
htpasswd_with_password.sh
htpasswd -nb username password另一种方法是使用 /dev/stdout 作为输出文件:
htpasswd_stdout.sh
htpasswd -c /dev/stdout username示例输出
htpasswd_output.txt
username:$apr1$KwZDqK6Q$Sr6/.MLMv5JUuFPSNY30L/Check 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