欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 人文社科 > 生活经验 >内容正文

生活经验

Apache htpasswd命令

发布时间:2023/11/27 生活经验 55 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Apache htpasswd命令 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

一、简介

htpasswd是apache的一个工具,该工具主要用于建立和更新存储用户名、密码的文本文件,主要用于对基于http用户的认证。

 

二、语法

Usage:htpasswd [-cimBdpsDv] [-C cost] passwordfile usernamehtpasswd -b[cmBdpsDv] [-C cost] passwordfile username passwordhtpasswd -n[imBdps] [-C cost] usernamehtpasswd -nb[mBdps] [-C cost] username password-c  Create a new file.-n  Don't update file; display results on stdout.-b  Use the password from the command line rather than prompting for it.-i  Read password from stdin without verification (for script usage).-m  Force MD5 encryption of the password (default).-B  Force bcrypt encryption of the password (very secure).-C  Set the computing time used for the bcrypt algorithm(higher is more secure but slower, default: 5, valid: 4 to 31).-d  Force CRYPT encryption of the password (8 chars max, insecure).-s  Force SHA encryption of the password (insecure).-p  Do not encrypt the password (plaintext, insecure).-D  Delete the specified user.-v  Verify password for the specified user.
On other systems than Windows and NetWare the '-p' flag will probably not work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

 

三、实例

https://blog.linuxeye.com/333.html

 

参考:https://blog.linuxeye.com/333.html

转载于:https://www.cnblogs.com/274914765qq/p/4918858.html

总结

以上是生活随笔为你收集整理的Apache htpasswd命令的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。