一、简介

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 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: , valid: to ).
-d Force CRYPT encryption of the password ( 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命令的更多相关文章

  1. Apache htpasswd命令用法详解

    一. 基础 htpasswd建立和更新存储用户名.密码的文本文件, 用于对HTTP用户的basic认证. # /usr/local/apache/bin/htpasswd –help Usage: h ...

  2. apache htpasswd.exe创建密码

    一.使用apache htpasswd.exe创建密码文件,命令请看PHP推荐教程:apache htpasswd命令用法详解 apache htpasswd命令用法实例 1.如何利用htpasswd ...

  3. htpasswd命令

    htpasswd命令是Apache的Web服务器内置工具,用于创建和更新储存用户名.域和用户基本认证的密码文件. 语法 htpasswd(选项)(参数) 选项 -c:创建一个加密文件:-n:不更新加密 ...

  4. htpasswd 命令详解

    htpasswd参数 -c 创建passwdfile.如果passwdfile 已经存在,那么它会重新写入并删去原有内容. -n 不更新passwordfile,直接显示密码 -m 使用MD5加密(默 ...

  5. nginx用户认证与htpasswd命令

    最近在搭建ELK,然后ELK的kibana界面想添加一个访问限制,看到kibana有个插件x-pack,本来想用用,发现是收费的,就放弃了,然后就想着想配置下nginx的认证访问来实现简单的访问登陆. ...

  6. Mac中Apache常用命令

    Apache常用命令记录,还是记一下吧,总是忘记. Apache常用命令: # sudo apachectl start // 启动Apache服务 # sudo apachectl stop // ...

  7. htpasswd命令的使用

    htpasswd的基本用法 htpasswd是Apache服务器中生成用户认证的一个工具,仅说明htpasswd的用法: htpasswd参数 -c 创建passwdfile.如果passwdfile ...

  8. 使用apache htpasswd生成加密的password文件,并使用.htaccess控制文件夹訪问

    htpasswd 是apache的小工具.在apache安装文件夹bin下可找到. Usage: htpasswd [-cmdpsD] passwordfile username htpasswd - ...

  9. Apache Htpasswd生成和验证密码

    Assuming you create the password using the following command and "myPassword" as the passw ...

随机推荐

  1. bzoj 2770 YY的Treap

    Written with StackEdit. Description 志向远大的\(YY\)小朋友在学完快速排序之后决定学习平衡树,左思右想再加上\(SY\)的教唆,\(YY\)决定学习\(Trea ...

  2. ASP.NET的几个试题(《C#与.NET程序员面试宝典》)

    更多参考:博客园笔记 :ASP.NET是什么 ASP.NET不是一种语言,而是创建动态Web页的一种强大的服务器端技术,它是Microsoft.NET Framework中一套用于生成Web应用程序和 ...

  3. 【模板】NOIP模板汇总

    图论 数据结构 数学 其他: 洛谷模板:a,b两个字符串,求b串在a串中出现的位置 #include<iostream> #include<cstdio> #include&l ...

  4. 好用的python第三方库

    参考连接:http://python.jobbole.com/84464/ https://www.zhihu.com/question/20501628 python每日技术更新:https://g ...

  5. Android蓝牙UUID简要

    UUID是"Universally Unique Identifier"的简称,通用唯一识别码的意思.对于蓝牙设备,每个服务都有通用.独立.唯一的UUID与之对应.也就是说,在同一 ...

  6. Arcmap10.1下安装ArcBrutile0.2.2 (Win7)(转)

    前阵子换了高级新电脑,用的win7旗舰版装了Arcgis10.1,一直没试过ArcBrutile0.2.2能不能用,今天想用的时候发现自己竟然忘记怎么加载这个工具了!!!   网上搜了一下,度娘今天不 ...

  7. (7)Stream简介

    流的个人理解: 怎样获得流: 怎样处理流: 中间操作和终端操作介绍: 中间操作和终端操作的使用: 流的个人理解: Stream也就是流,他和IO流不一样,他是java8诞生的东西,我对他的理解就是一个 ...

  8. Scanner 的练习 。。。。依然不懂用法。。。苦恼

    package com.b; import java.util.Random; import java.util.Scanner; public class Core { public static ...

  9. Oracle 复杂查询(1)

    一.复杂查询 1. 列出至少有一个员工的所有部门编号.名称,并统计出这些部门的平均工资.最低工资.最高工资. 1.确定所需要的数据表: emp表:可以查询出员工的数量: dept表:部门名称: emp ...

  10. AJAX中的跨域问题:什么是跨域?如何解决跨域问题?

    域不一样的,即为跨域,包括(协议,域名,端口号) 1. 指定允许其他域名访问 header('Access-Control-Allow-Origin:*'); 2.使用jsonp