{"id":44786,"date":"2024-10-06T18:09:13","date_gmt":"2024-10-06T10:09:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/44786\/"},"modified":"2024-10-06T18:09:13","modified_gmt":"2024-10-06T10:09:13","slug":"linux-%e5%91%bd%e4%bb%a4%ef%bc%9apasswd-%e6%9b%b4%e6%94%b9%e7%94%a8%e6%88%b6%e5%af%86%e7%a2%bc","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/44786\/","title":{"rendered":"Linux \u547d\u4ee4\uff1apasswd &#8211; \u66f4\u6539\u7528\u6236\u5bc6\u78bc"},"content":{"rendered":"<h1 id=\"linux-%e5%91%bd%e4%bb%a4%ef%bc%9apasswd-%e6%9b%b4%e6%94%b9%e7%94%a8%e6%88%b6%e5%af%86%e7%a2%bc-TqQKntZZrs\">Linux \u547d\u4ee4\uff1apasswd &#8211; \u66f4\u6539\u7528\u6236\u5bc6\u78bc<\/h1>\n<p>\u5728Linux\u7cfb\u7d71\u4e2d\uff0c\u5b89\u5168\u6027\u662f\u81f3\u95dc\u91cd\u8981\u7684\uff0c\u800c\u7528\u6236\u5bc6\u78bc\u7684\u7ba1\u7406\u5247\u662f\u4fdd\u8b77\u7cfb\u7d71\u7684\u4e00\u500b\u57fa\u672c\u65b9\u9762\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eLinux\u547d\u4ee4\u4e2d\u7684<code>passwd<\/code>\u547d\u4ee4\uff0c\u9019\u662f\u4e00\u500b\u7528\u65bc\u66f4\u6539\u7528\u6236\u5bc6\u78bc\u7684\u5de5\u5177\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%afpasswd%e5%91%bd%e4%bb%a4%ef%bc%9f-TqQKntZZrs\">\u4ec0\u9ebc\u662fpasswd\u547d\u4ee4\uff1f<\/h2>\n<p><code>passwd<\/code>\u547d\u4ee4\u662fLinux\u7cfb\u7d71\u4e2d\u7528\u4f86\u66f4\u6539\u7528\u6236\u5bc6\u78bc\u7684\u547d\u4ee4\u3002\u5b83\u4e0d\u50c5\u53ef\u4ee5\u7528\u65bc\u666e\u901a\u7528\u6236\u66f4\u6539\u81ea\u5df1\u7684\u5bc6\u78bc\uff0c\u9084\u53ef\u4ee5\u7531\u7cfb\u7d71\u7ba1\u7406\u54e1\u7528\u4f86\u66f4\u6539\u5176\u4ed6\u7528\u6236\u7684\u5bc6\u78bc\u3002\u9019\u500b\u547d\u4ee4\u7684\u4f7f\u7528\u975e\u5e38\u7c21\u55ae\uff0c\u4f46\u537b\u662f\u7dad\u8b77\u7cfb\u7d71\u5b89\u5168\u7684\u91cd\u8981\u6b65\u9a5f\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8passwd%e5%91%bd%e4%bb%a4-TqQKntZZrs\">\u5982\u4f55\u4f7f\u7528passwd\u547d\u4ee4<\/h2>\n<p>\u4f7f\u7528<code>passwd<\/code>\u547d\u4ee4\u7684\u57fa\u672c\u8a9e\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>passwd [\u9078\u9805] [\u7528\u6236\u540d]<\/code><\/pre>\n<p>\u5982\u679c\u4e0d\u6307\u5b9a\u7528\u6236\u540d\uff0c\u5247\u9ed8\u8a8d\u66f4\u6539\u7576\u524d\u7528\u6236\u7684\u5bc6\u78bc\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u7528\u6cd5\u793a\u4f8b\uff1a<\/p>\n<h3 id=\"1-%e6%9b%b4%e6%94%b9%e7%95%b6%e5%89%8d%e7%94%a8%e6%88%b6%e7%9a%84%e5%af%86%e7%a2%bc-TqQKntZZrs\">1. \u66f4\u6539\u7576\u524d\u7528\u6236\u7684\u5bc6\u78bc<\/h3>\n<p>\u8981\u66f4\u6539\u7576\u524d\u7528\u6236\u7684\u5bc6\u78bc\uff0c\u53ea\u9700\u5728\u7d42\u7aef\u4e2d\u8f38\u5165\uff1a<\/p>\n<pre><code>passwd<\/code><\/pre>\n<p>\u7cfb\u7d71\u6703\u63d0\u793a\u60a8\u8f38\u5165\u7576\u524d\u5bc6\u78bc\uff0c\u7136\u5f8c\u518d\u8f38\u5165\u65b0\u5bc6\u78bc\u3002\u8acb\u6ce8\u610f\uff0c\u70ba\u4e86\u5b89\u5168\u8d77\u898b\uff0c\u8f38\u5165\u5bc6\u78bc\u6642\u4e0d\u6703\u986f\u793a\u5b57\u7b26\u3002<\/p>\n<h3 id=\"2-%e6%9b%b4%e6%94%b9%e5%85%b6%e4%bb%96%e7%94%a8%e6%88%b6%e7%9a%84%e5%af%86%e7%a2%bc-TqQKntZZrs\">2. \u66f4\u6539\u5176\u4ed6\u7528\u6236\u7684\u5bc6\u78bc<\/h3>\n<p>\u5982\u679c\u60a8\u662f\u7cfb\u7d71\u7ba1\u7406\u54e1\uff0c\u60a8\u53ef\u4ee5\u66f4\u6539\u5176\u4ed6\u7528\u6236\u7684\u5bc6\u78bc\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>sudo passwd \u7528\u6236\u540d<\/code><\/pre>\n<p>\u9019\u88e1\u7684<code>\u7528\u6236\u540d<\/code>\u662f\u60a8\u60f3\u8981\u66f4\u6539\u5bc6\u78bc\u7684\u7528\u6236\u7684\u540d\u7a31\u3002\u7cfb\u7d71\u6703\u8981\u6c42\u60a8\u8f38\u5165\u65b0\u5bc6\u78bc\u3002<\/p>\n<h2 id=\"%e9%81%b8%e9%a0%85-TqQKntZZrs\">\u9078\u9805<\/h2>\n<p><code>passwd<\/code>\u547d\u4ee4\u9084\u6709\u4e00\u4e9b\u6709\u7528\u7684\u9078\u9805\uff1a<\/p>\n<ul>\n<li><code>-d<\/code>\uff1a\u522a\u9664\u7528\u6236\u7684\u5bc6\u78bc\uff0c\u9019\u6a23\u7528\u6236\u5c07\u7121\u6cd5\u518d\u4f7f\u7528\u5bc6\u78bc\u767b\u9304\u3002<\/li>\n<li><code>-e<\/code>\uff1a\u5f37\u5236\u7528\u6236\u5728\u4e0b\u6b21\u767b\u9304\u6642\u66f4\u6539\u5bc6\u78bc\u3002<\/li>\n<li><code>-l<\/code>\uff1a\u9396\u5b9a\u7528\u6236\u5e33\u6236\uff0c\u9632\u6b62\u7528\u6236\u767b\u9304\u3002<\/li>\n<li><code>-u<\/code>\uff1a\u89e3\u9396\u7528\u6236\u5e33\u6236\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%ae%89%e5%85%a8%e6%80%a7%e8%80%83%e9%87%8f-TqQKntZZrs\">\u5b89\u5168\u6027\u8003\u91cf<\/h2>\n<p>\u5728\u66f4\u6539\u5bc6\u78bc\u6642\uff0c\u9078\u64c7\u4e00\u500b\u5f37\u5bc6\u78bc\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u5f37\u5bc6\u78bc\u61c9\u8a72\u5305\u542b\u5927\u5beb\u5b57\u6bcd\u3001\u5c0f\u5beb\u5b57\u6bcd\u3001\u6578\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\uff0c\u4e26\u4e14\u9577\u5ea6\u61c9\u81f3\u5c11\u70ba8\u500b\u5b57\u7b26\u3002\u6b64\u5916\uff0c\u5b9a\u671f\u66f4\u6539\u5bc6\u78bc\u4e5f\u662f\u4e00\u7a2e\u826f\u597d\u7684\u5b89\u5168\u7fd2\u6163\u3002<\/p>\n<h2 id=\"%e5%b8%b8%e8%a6%8b%e5%95%8f%e9%a1%8c-TqQKntZZrs\">\u5e38\u898b\u554f\u984c<\/h2>\n<h3 id=\"1-%e5%a6%82%e6%9e%9c%e5%bf%98%e8%a8%98%e4%ba%86%e5%af%86%e7%a2%bc%e6%80%8e%e9%ba%bc%e8%be%a6%ef%bc%9f-TqQKntZZrs\">1. \u5982\u679c\u5fd8\u8a18\u4e86\u5bc6\u78bc\u600e\u9ebc\u8fa6\uff1f<\/h3>\n<p>\u5982\u679c\u60a8\u5fd8\u8a18\u4e86\u7528\u6236\u7684\u5bc6\u78bc\uff0c\u7cfb\u7d71\u7ba1\u7406\u54e1\u53ef\u4ee5\u4f7f\u7528<code>passwd<\/code>\u547d\u4ee4\u91cd\u8a2d\u5bc6\u78bc\u3002\u9019\u9700\u8981\u64c1\u6709\u76f8\u61c9\u7684\u7ba1\u7406\u6b0a\u9650\u3002<\/p>\n<h3 id=\"2-%e5%af%86%e7%a2%bc%e6%9b%b4%e6%94%b9%e5%be%8c%e9%9c%80%e8%a6%81%e9%87%8d%e6%96%b0%e7%99%bb%e9%8c%84%e5%97%8e%ef%bc%9f-TqQKntZZrs\">2. \u5bc6\u78bc\u66f4\u6539\u5f8c\u9700\u8981\u91cd\u65b0\u767b\u9304\u55ce\uff1f<\/h3>\n<p>\u662f\u7684\uff0c\u7576\u60a8\u66f4\u6539\u5bc6\u78bc\u5f8c\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u65b0\u5bc6\u78bc\u91cd\u65b0\u767b\u9304\u7cfb\u7d71\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-TqQKntZZrs\">\u7e3d\u7d50<\/h2>\n<p>\u5728Linux\u7cfb\u7d71\u4e2d\uff0c<code>passwd<\/code>\u547d\u4ee4\u662f\u4e00\u500b\u7c21\u55ae\u800c\u5f37\u5927\u7684\u5de5\u5177\uff0c\u7528\u65bc\u7ba1\u7406\u7528\u6236\u5bc6\u78bc\u3002\u7121\u8ad6\u662f\u666e\u901a\u7528\u6236\u9084\u662f\u7cfb\u7d71\u7ba1\u7406\u54e1\uff0c\u638c\u63e1\u9019\u500b\u547d\u4ee4\u90fd\u80fd\u6709\u6548\u63d0\u9ad8\u7cfb\u7d71\u7684\u5b89\u5168\u6027\u3002\u5b9a\u671f\u66f4\u6539\u5bc6\u78bc\u548c\u4f7f\u7528\u5f37\u5bc6\u78bc\u662f\u4fdd\u8b77\u7cfb\u7d71\u7684\u91cd\u8981\u63aa\u65bd\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u591a\u6709\u95dc<code>VPS<\/code>\u3001<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216\u5176\u4ed6\u4f3a\u670d\u5668\u7ba1\u7406\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8cc7\u6e90\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Linux \u547d\u4ee4 `passwd` \u66f4\u6539\u7528\u6236\u5bc6\u78bc\uff0c\u78ba\u4fdd\u7cfb\u7d71\u5b89\u5168\u8207\u500b\u4eba\u96b1\u79c1\u4fdd\u8b77\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-44786","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=44786"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44786\/revisions"}],"predecessor-version":[{"id":44787,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44786\/revisions\/44787"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=44786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=44786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=44786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}