printf "admin:$(openssl passwd -crypt 123456)\n" >> .htpasswd admin与123456分别是用户名与密码 转载于:https://www.cnblogs.com/wlemory/p/5353709.html