htpasswd小工具生成密码

来源:互联网 发布:深圳网络推广外包 编辑:程序博客网 时间:2024/05/16 00:43

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

[root@test tmp]# htpasswd -nbm passwd test 1234Usage:    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
原创粉丝点击