{"id":3028,"date":"2019-06-12T00:17:37","date_gmt":"2019-06-11T16:17:37","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3028"},"modified":"2019-06-12T13:59:43","modified_gmt":"2019-06-12T05:59:43","slug":"htpasswd","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/htpasswd","title":{"rendered":"htpasswd\u547d\u4ee4 – \u7ba1\u7406\u7528\u6237\u57fa\u672c\u8ba4\u8bc1\u6587\u4ef6"},"content":{"rendered":"\n
htpasswd\u547d\u4ee4\u662fApache\u7684Web\u670d\u52a1\u5668\u5185\u7f6e\u5de5\u5177\uff0c\u7528\u4e8e\u521b\u5efa\u548c\u66f4\u65b0\u50a8\u5b58\u7528\u6237\u540d\u3001\u57df\u548c\u7528\u6237\u57fa\u672c\u8ba4\u8bc1\u7684\u5bc6\u7801\u6587\u4ef6\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>htpasswd [\u53c2\u6570] [\u7528\u6237\u548c\u5bc6\u7801]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u6dfb\u52a0\u7528\u6237\u5e76\u8bbe\u7f6e\u5bc6\u7801\uff1a<\/p>\n\n\n\n \u5728\u4e0a\u9762\u751f\u6210\u7684\u5bc6\u7801\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u7528\u6237\u5e76\u8bbe\u7f6e\u5bc6\u7801 \uff1a<\/p>\n\n\n\n \u5220\u9664\u7528\u6237\u540d\u548c\u5bc6\u7801\uff1a<\/p>\n\n\n\n \u4fee\u6539\u5bc6\u7801\uff1a<\/p>\n\n\n\n htpasswd\u547d\u4ee4\u662fApache\u7684Web\u670d\u52a1\u5668\u5185\u7f6e\u5de5\u5177\uff0c\u7528\u4e8e\u521b\u5efa\u548c\u66f4\u65b0\u50a8\u5b58\u7528\u6237\u540d\u3001\u57df\u548c\u7528\u6237\u57fa\u672c\u8ba4\u8bc1\u7684\u5bc6\u7801\u6587\u4ef6 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3028"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3028"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3028\/revisions"}],"predecessor-version":[{"id":3113,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3028\/revisions\/3113"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-c<\/td> \u521b\u5efa\u4e00\u4e2a\u52a0\u5bc6\u6587\u4ef6<\/td><\/tr> -n<\/td> \u4e0d\u66f4\u65b0\u52a0\u5bc6\u6587\u4ef6\uff0c\u53ea\u5c06\u52a0\u5bc6\u540e\u7684\u7528\u6237\u540d\u5bc6\u7801\u663e\u793a\u5728\u5c4f\u5e55\u4e0a<\/td><\/tr> -m<\/td> \u9ed8\u8ba4\u91c7\u7528MD5\u7b97\u6cd5\u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6 <\/td><\/tr> -d<\/td> \u91c7\u7528CRYPT\u7b97\u6cd5\u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6<\/td><\/tr> -p<\/td> \u4e0d\u5bf9\u5bc6\u7801\u8fdb\u884c\u8fdb\u884c\u52a0\u5bc6\uff0c\u5373\u660e\u6587\u5bc6\u7801<\/td><\/tr> -s<\/td> \u91c7\u7528SHA\u7b97\u6cd5\u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6<\/td><\/tr> -b<\/td> \u5728\u547d\u4ee4\u884c\u4e2d\u4e00\u5e76\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u800c\u4e0d\u662f\u6839\u636e\u63d0\u793a\u8f93\u5165\u5bc6\u7801<\/td><\/tr> -D<\/td> \u5220\u9664\u6307\u5b9a\u7684\u7528\u6237<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# htpasswd -bc .passwd linuxcool 123456<\/pre>\n\n\n\n
[root@linuxcool ~]# htpasswd -b .passwd linuxprobe 123456<\/pre>\n\n\n\n
[root@linuxcool ~]# htpasswd -D .passwd linuxcool<\/pre>\n\n\n\n
[root@linuxcool ~]# htpasswd -D .passwd linuxcool\n[root@linuxcool ~]# htpasswd -b .passwd linuxcool 654321<\/pre>\n","protected":false},"excerpt":{"rendered":"