{"id":1714,"date":"2019-05-10T23:24:56","date_gmt":"2019-05-10T15:24:56","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1714"},"modified":"2019-05-11T12:24:20","modified_gmt":"2019-05-11T04:24:20","slug":"chpasswd","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/chpasswd","title":{"rendered":"chpasswd\u547d\u4ee4 – \u6279\u91cf\u66f4\u65b0\u5bc6\u7801"},"content":{"rendered":"\n

chpasswd\u547d\u4ee4\u662f\u6279\u91cf\u66f4\u65b0\u7528\u6237\u53e3\u4ee4\u7684\u5de5\u5177\uff0c\u662f\u628a\u4e00\u4e2a\u6587\u4ef6\u5185\u5bb9\u91cd\u65b0\u5b9a\u5411\u6dfb\u52a0\u5230\/etc\/shadow\u4e2d\u3002<\/p>\n\n\n\n

chpasswd\u547d\u4ee4\u4ece\u7cfb\u7edf\u7684\u6807\u51c6\u8f93\u5165\u8bfb\u5165\u7528\u6237\u7684\u540d\u79f0\u548c\u53e3\u4ee4\uff0c\u5e76\u5229\u7528\u8fd9\u4e9b\u4fe1\u606f\u6765\u66f4\u65b0\u7cfb\u7edf\u4e0a\u5df2\u5b58\u5728\u7684\u7528\u6237\u7684\u53e3\u4ee4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f<\/strong>\uff1a chpasswd [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570<\/strong>\uff1a<\/p>\n\n\n\n
-e<\/td>\u8f93\u5165\u7684\u5bc6\u7801\u662f\u52a0\u5bc6\u540e\u7684\u5bc6\u6587<\/td><\/tr>
-m<\/td>\u5f53\u88ab\u652f\u6301\u7684\u5bc6\u7801\u672a\u88ab\u52a0\u5bc6\u65f6\uff0c\u4f7f\u7528MD5\u52a0\u5bc6\u4ee3\u66ffDES\u52a0\u5bc6<\/td><\/tr>
-h<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u5e76\u9000\u51fa<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u8fd0\u7528chpasswd\u547d\u4ee4\u6765\u6279\u91cf\u4fee\u6539\u5bc6\u7801\uff0c\u662flinux\u7cfb\u7edf\u7ba1\u7406\u4e2d\u7684\u6377\u5f84\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# cat user.txt\nlinuxcool:redhat\n[root@linuxcool ~]# chpasswd < user.txt<\/pre>\n","protected":false},"excerpt":{"rendered":"

chpasswd\u547d\u4ee4\u662f\u6279\u91cf\u66f4\u65b0\u7528\u6237\u53e3\u4ee4\u7684\u5de5\u5177\uff0c\u662f\u628a\u4e00\u4e2a\u6587\u4ef6\u5185\u5bb9\u91cd\u65b0\u5b9a\u5411\u6dfb\u52a0\u5230\/etc\/shadow\u4e2d\u3002 chp […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1714"}],"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=1714"}],"version-history":[{"count":11,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1714\/revisions"}],"predecessor-version":[{"id":1966,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1714\/revisions\/1966"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}