htpasswd小工具生成密码

有时候,svn或者nginx的简单验证的地方需要htpasswd生成的密码。

[root@test tmp]# htpasswd -nbm passwd test 1234
Usage:
    htpasswd [-cmdpsD] passwordfile username
    htpasswd -b[cmdpsD] passwordfile username password

    htpasswd -n[mdps] username
    htpasswd -nb[mdps] username password
 -c  Create a new file. # 创建一个新的文件
 -n  Don't update file; display results on stdout. # 直接输出产生的结果,无需写入或者更新文件。
 -m  Force MD5 encryption of the password.#  采用md5哈希
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it. # 密码会放在命令行里。
 -D  Delete the specified user. # 删除某个账户
  • 有一个种,直接生成的方式,结果会直接显示出来,然后只需要把它粘贴到相应的passwd里面就好了。
htpasswd -nbm user1 passwd1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值