linux\u521b\u5efa\u7528\u6237\u547d\u4ee4<\/strong>\uff0c\u5728\u4f7f\u7528Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u7a97\u53e3\u4e2d\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u767b\u5f55\u5e76\u6267\u884c\u4eb2\u5207\u53cb\u597d\u7684'adduser'\u6307\u4ee4\u4fbf\u53ef\u8fc5\u901f\u65b0\u5efa\u7528\u6237\u8d26\u6237\u3002\u975e\u5e38\u611f\u8c22\u4f60\u7684\u9605\u8bfb\u548c\u652f\u6301linux\u64cd\u4f5c\u7cfb\u7edf\u8bba\u6587\uff0c\u8ba9\u6211\u4eec\u4e00\u8d77\u5728\u6b64\u57fa\u7840\u4e0a\u66f4\u8fdb\u4e00\u6b65\u63a2\u7d22Linux\u7cfb\u7edf\u7684\u5965\u79d8\u5427\uff01<\/p>\n```<\/p>\n
adduser username<\/p>\n
\u5c0a\u656c\u7684\u7528\u6237\uff0c\u8bf7\u5728\u6b64\u5904\u8f93\u5165\u60a8\u6ee1\u610f\u7684\u8d26\u6237\u540d——\"username\"\u3002\u968f\u540e\uff0c\u6211\u4eec\u5c06\u6307\u5bfc\u5e76\u5e2e\u52a9\u60a8\u8bbe\u7f6e\u4e00\u4e2a\u5b89\u5168\u7684\u8d26\u6237\u5bc6\u7801\u548c\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002\u8bf7\u8ddf\u968f\u5c4f\u5e55\u6b65\u9aa4\u8fdb\u884c\u8bbe\u7f6e\uff0c\u5373\u53ef\u987a\u5229\u5b8c\u6210\u65b0\u8d26\u6237\u6ce8\u518c\u8fc7\u7a0b\u54e6\u3002<\/p>\n
\u7b2c\u4e09\u70b9\uff1a\u5982\u4f55\u8bbe\u7f6e\u7528\u6237\u5bc6\u7801\uff1f<\/b><\/p>\n
\u5c0a\u656c\u7684\u7528\u6237\uff0c\u5b8c\u6210\u6ce8\u518c\u540e\u8bf7\u7acb\u523b\u8bbe\u5b9a\u5bc6\u7801\u4ee5\u4fdd\u8bc1\u8d26\u6237\u5b89\u5168\u3002\u4e3a\u4e86\u9632\u6b62\u4ed6\u4eba\u8f7b\u6613\u731c\u51fa\u60a8\u7684\u5bc6\u7801\uff0c\u5efa\u8bae\u60a8\u8bbe\u7f6e\u8db3\u591f\u590d\u6742\u4e14\u96be\u4ee5\u8bc6\u522b\u7684\u5bc6\u7801\u3002\u5982\u6709\u9700\u8981\uff0c\u968f\u65f6\u53ef\u4ee5\u901a\u8fc7\u76f8\u5e94\u754c\u9762\u66f4\u6b63\u539f\u6709\u7684\u5bc6\u7801\u54e6\uff01<\/p>\n
passwd username<\/p>\n
<\/p>\n
\u5176\u4e2d\uff0c\"username\"\u662f\u4f60\u60f3\u8981\u4fee\u6539\u5bc6\u7801\u7684\u7528\u6237\u540d\u3002<\/p>\n
\u7b2c\u56db\u70b9\uff1a\u5982\u4f55\u5220\u9664\u7528\u6237\uff1f<\/b><\/p>\n
\u5982\u679c\u60a8\u5e0c\u671b\u5220\u53bb\u5df2\u5b58\u5728\u7684\u7528\u6237\uff0c\u6b22\u8fce\u4f7f\u7528\"deluser\"\u547d\u4ee4\u5462\uff01\u53ea\u9700\u5728\u63a7\u5236\u53f0\u8f7b\u677e\u5f55\u5165\u4ee5\u4e0b\u51e0\u884c\u4ee3\u7801\u5373\u53ef\uff1a<\/p>\n
deluser username<\/p>\n
\u82e5\u60a8\u5e0c\u671b\u4ece\u7cfb\u7edf\u5220\u9664\u7279\u5b9a\u7528\u6237\uff0c\u8bf7\u5c06\"username\"\u66ff\u6362\u4e3a\u5bf9\u5e94\u7684\u6709\u6548\u7528\u6237\u540d\u79f0\u3002\u540c\u65f6\uff0c\u7cfb\u7edf\u4f1a\u8d34\u5fc3\u8be2\u95ee\u60a8\u662f\u5426\u987a\u624b\u6e05\u9664\u5176\u4e2a\u4eba\u6587\u4ef6\u5939\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002\u81f3\u4e8e\u662f\u6216\u5426\uff0c\u60a8\u81ea\u5df1\u505a\u4e3b\u54e6\uff01<\/p>\n
<\/p>\n
\u7b2c\u4e94\u70b9\uff1a\u5982\u4f55\u4fee\u6539\u7528\u6237\u4fe1\u606f\uff1f<\/b><\/p>\n
\u5728Linux\u7cfb\u7edf\u5185\uff0c\u8bf7\u60a8\u4e0d\u59a8\u8bd5\u8bd5\u5229\u7528\"usermod\"\u6307\u4ee4\u8c03\u6574\u73b0\u6709\u7528\u6237\u4fe1\u606f\u54e6\uff01\u4e3e\u4f8b\u800c\u8a00\uff0c\u5047\u8bbe\u8981\u4e3a\u67d0\u4f4d\u7528\u6237\u6539\u53d8\u6635\u79f0\uff0c\u4ec5\u9700\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\u5373\u53ef\uff1a<\/p>\n
\u8bf7\u8f93\u5165 usermod -l\u65b0\u7684\u7528\u6237\u540d\u539f\u6765\u7684\u7528\u6237\u540d\u3002<\/p>\n
\u5c0a\u656c\u7684\u8bfb\u8005\u670b\u53cb\uff0c\u8bf7\u60a8\u5728\u6b64\u5904\u586b\u5199\"new_username\",\u4ee5\u4fbf\u6211\u4eec\u66f4\u65b0\u60a8\u7684\u7528\u6237\u540d\u4fe1\u606f\uff1b\u6b64\u5916\uff0c\"old_username\"\u5373\u4e3a\u539f\u6709\u7684\u7528\u6237\u540d\u3002<\/p>\n
\u7b2c\u516d\u70b9\uff1a\u5982\u4f55\u5207\u6362\u7528\u6237\u8eab\u4efd\uff1f<\/b><\/p>\n
<\/p>\n
\u5728 Linux \u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7\u4f7f\u7528\"su\"\u6307\u4ee4linux\u793e\u533a\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5207\u6362\u4f7f\u7528\u8005\u89d2\u8272\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u60a8\u9700\u4ee5\u5176\u4ed6\u7528\u6237\u8eab\u4efd\u6267\u884c\u547d\u4ee4\uff0c\u53ea\u9700\u8f93\u5165\u4ee5\u4e0b\u5173\u952e\u5b57\u4fbf\u53ef\u5b9e\u73b0\uff1a<\/p>\n
su username<\/p>\n
\u5c0a\u656c\u7684\u7528\u6237\uff0c\u7cfb\u7edf\u4f1a\u53cb\u597d\u5730\u63d0\u9192\u60a8\u8f93\u5165“username”\u4f5c\u4e3a\u76ee\u6807\u7528\u6237\u540d\u3002\u63a5\u4e0b\u6765\uff0c\u8bf7\u60a8\u4e3a\u4ed6\u8bbe\u7f6e\u4e00\u4e2a\u72ec\u6709\u7684\u5bc6\u7801\uff0c\u4ee5\u4fbf\u8fdb\u884c\u8eab\u4efd\u786e\u8ba4\u3002\u5728\u901a\u8fc7\u9a8c\u8bc1\u4e4b\u540e\uff0c\u6211\u4eec\u671f\u5f85\u60a8\u80fd\u591f\u987a\u5229\u5207\u6362\u5230\u9700\u8981\u7684\u7528\u6237\u89d2\u8272\uff0c\u4eab\u53d7\u66f4\u52a0\u4fbf\u6377\u7684\u4f53\u9a8c\uff01<\/p>\n
\u7b2c\u4e03\u70b9\uff1a\u5982\u4f55\u67e5\u770b\u7528\u6237\u4fe1\u606f\uff1f<\/b><\/p>\n
\u82e5\u60a8\u60f3\u77e5\u6653\u6240\u6709Linux\u7528\u6237\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u53ea\u9700\u8f7b\u6572\u547d\u4ee4\"cat \/etc\/passwd\"\u5373\u53ef\u5f97\u5230\u3002\u6b64\u6587\u4ef6\u59a5\u5e16\u5730\u8bb0\u5f55\u4e86\u6bcf\u4e2a\u7528\u6237\u8d26\u6237\u7684\u8be6\u7ec6\u60c5\u51b5\u54df\uff01<\/p>\n
<\/p>\n
\u7b2c\u516b\u70b9\uff1a\u5982\u4f55\u9650\u5236\u7528\u6237\u767b\u5f55\uff1f<\/b><\/p>\n
\u5982\u9700\u9650\u5236\u67d0\u4e2a\u7528\u6237\u767b\u5f55\uff0c\u8bf7\u5bf9\"\/etc\/passwd\"\u6587\u4ef6\u8fdb\u884c\u76f8\u5e94\u4fee\u6539\u3002\u53ea\u9700\u5c06\u8be5\u7528\u6237\u90a3\u4e00\u884c\u7684\u767b\u9646 shell \u8bbe\u7f6e\u4e3a\"\/usr\/sbin\/nologin\"\uff0c\u5c31\u80fd\u963b\u6b62\u4ed6\u6210\u529f\u767b\u5f55\u5230\u7cfb\u7edf\u54e6\u3002<\/p>\n
\u7b2c\u4e5d\u70b9\uff1a\u5982\u4f55\u8bbe\u7f6e\u7528\u6237\u6743\u9650\uff1f<\/b><\/p>\n
\u5728 Linux \u7cfb\u7edf\u4e2d\uff0c\u5229\u7528\"chmod\"\u547d\u4ee4\u53ef\u65b9\u4fbf\u5730\u8c03\u6574\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6743\u9650\u8bbe\u7f6e\u3002\u6b63\u786e\u4e14\u9002\u5f53\u8d4b\u4e88\u5404\u7528\u6237\u7684\u6743\u9650\uff0c\u5c31\u53ef\u4ee5\u6709\u6548\u5730\u63a7\u5236\u4ed6\u4eec\u5bf9\u7cfb\u7edf\u8d44\u6e90\u7684\u67e5\u9605\u4e0e\u64cd\u4f5c\u3002\u5982\u9700\u66f4\u8be6\u7ec6\u7684\u6743\u9650\u8bbe\u5b9a\u6307\u5bfc\uff0c\u6b22\u8fce\u53c2\u9605\u76f8\u5173\u6587\u6863\u4e86\u89e3\u3002<\/p>\n
\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u4e3a\u60a8\u63d0\u4f9b\u66f4\u591a\u5173\u4e8eLinux\u4e0b\u521b\u5efa\u7528\u6237\u7684\u8be6\u7ec6\u77e5\u8bc6\uff0c\u4ee5\u4fbf\u4e8e\u5b9e\u9645\u8fd0\u7528\u4e2d\u66f4\u4e3a\u5a34\u719f\u3002\u5982\u6709\u7591\u60d1\uff0c\u656c\u8bf7\u968f\u65f6\u5411\u6211\u4eec\u54a8\u8be2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u968f\u540e\uff0c\u6211\u4eec\u5c06\u6307\u5bfc\u5e76\u5e2e\u52a9\u60a8\u8bbe\u7f6e\u4e00\u4e2a\u5b89\u5168\u7684\u8d26\u6237\u5bc6\u7801\u548c\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002\u5c0a\u656c\u7684\u7528\u6237\uff0c\u5b8c\u6210\u6ce8\u518c\u540e\u8bf7\u7acb\u523b\u8bbe\u5b9a\u5bc6\u7801\u4ee5\u4fdd\u8bc1\u8d26\u6237\u5b89\u5168\u3002\u5c0a\u656c\u7684\u7528\u6237\uff0c\u7cfb\u7edf\u4f1a\u53cb\u597d\u5730\u63d0\u9192\u60a8\u8f93\u5165“username”\u4f5c\u4e3a\u76ee\u6807\u7528\u6237\u540d\u3002\u7cfb\u7edf\u4e2d\uff0c\u5229\u7528chmod\u547d\u4ee4\u53ef\u65b9\u4fbf\u5730\u8c03\u6574\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6743\u9650\u8bbe\u7f6e\u3002<\/p>\n","protected":false},"author":1,"featured_media":289310,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-289309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=289309"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289309\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/289310"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=289309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=289309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=289309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}