码迷,mamicode.com
首页 > Web开发 > 详细

Apache htpasswd命令

时间:2015-10-28 22:50:45      阅读:316      评论:0      收藏:0      [点我收藏+]

标签:

一、简介

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

 

二、语法

Usage:
    htpasswd [-cimBdpsDv] [-C cost] passwordfile username
    htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password

    htpasswd -n[imBdps] [-C cost] username
    htpasswd -nb[mBdps] [-C cost] username password
 -c  Create a new file.
 -n  Dont 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.

 

三、实例

 

Apache htpasswd命令

标签:

原文地址:http://www.cnblogs.com/274914765qq/p/4918858.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!