{"id":4202,"date":"2020-12-19T12:43:16","date_gmt":"2020-12-19T04:43:16","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=4202"},"modified":"2020-12-19T13:19:59","modified_gmt":"2020-12-19T05:19:59","slug":"linux%e9%9c%80%e4%b8%8d%e9%9c%80%e8%a6%81%e7%a6%81%e7%94%a8root%e8%b4%a6%e6%88%b7%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/4202.html","title":{"rendered":"Linux\u9700\u4e0d\u9700\u8981\u7981\u7528root\u8d26\u6237\uff1f"},"content":{"rendered":"

\u5f88\u65e9\u4e4b\u524d\u5c31\u770b\u8fc7\u5173\u4e8eLinux\u5b89\u5168\u5efa\u8bae\u7684\u6587\u7ae0\uff0c\u5176\u4e2d\u6709\u4e00\u6761\u4fbf\u662f\uff1a\u7981\u7528root\u8d26\u6237\uff0c\u5e73\u65f6\u4f7f\u7528\u666e\u901a\u8d26\u53f7\uff0c\u5fc5\u8981\u65f6\u901a\u8fc7sudo\u547d\u4ee4\u83b7\u53d6root\u6743\u9650(\u6216\u8005\u81f3\u5c11\u7981\u7528root\u7684ssh\u767b\u5f55\uff0c\u767b\u5f55\u540e\u518d\u7528sudo\u6216\u8005su\u5207\u6362\u5230root)\u3002<\/p>\n

\u4e4b\u524d\u5728Ubuntu\u4e0a\u5403\u8fc7\u4e8f\uff0c\u56e0\u6b64\u6211\u504f\u5411\u4e8e\u4e3aroot\u8d26\u6237\u8bbe\u7f6e\u5bc6\u7801\uff0croot\u8d26\u6237\u8ba9\u6211\u5145\u6ee1\u7740\u5bf9\u673a\u5668\u7684\u638c\u63a7\u611f\u3002\u4f46\u66b4\u9732\u5728\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u5b89\u5168\u6bd5\u7adf\u5341\u5206\u91cd\u8981\uff0c\u56e0\u6b64\u6309\u7167\u5b89\u5168\u5efa\u8bae\u5728\u90e8\u5206\u91cd\u8981\u673a\u5668\u4e0a\u7981\u6b62\u4e86root\u8d26\u6237\u8fdc\u7a0b\u767b\u5f55\uff0c\u6539\u7528\u666e\u901a\u7528\u6237+sudo\u63d0\u6743\u6a21\u5f0f\u3002<\/p>\n

\"\"<\/a><\/p>\n

\u4f7f\u7528\u4e00\u6bb5\u65f6\u95f4\u540e\uff0c\u53d1\u73b0\u7981\u7528root\u8d26\u6237\u5e76\u6ca1\u6709\u5e26\u6765\u592a\u591a\u5b89\u5168\u6027\u63d0\u5347\uff0c\u53cd\u800c\u4f1a\u5bfc\u81f4\u65e5\u5e38\u7ba1\u7406\u5341\u5206\u4e0d\u4fbf\u3002\u8fd9\u4e5f\u8ba9\u6211\u53cd\u601d\u5982\u4f55\u624d\u662f\u7981\u7528root\u8d26\u6237\u7684\u6b63\u786e\u65b9\u5f0f\uff1f<\/p>\n

\u7ecf\u8fc7\u4e00\u756a\u601d\u8003\uff0c\u4e2a\u4eba\u5f97\u51fa\u7981\u7528root\u7684\u573a\u666f\uff1a<\/p>\n

\u684c\u9762\u73af\u5883\u4f7f\u7528\uff1b\u4f8b\u5982\u5728\u4e2a\u4eba\u7535\u8111\u4e0a\u5b89\u88c5\u684c\u9762\u7248\u7684Ubuntu\u3001Debian\u3001Fedora\u7b49\u7cfb\u7edf\u65e5\u5e38\u4f7f\u7528\uff0c\u63a8\u8350\u4e0d\u521b\u5efaroot\u8d26\u6237\uff1b
\n\u591a\u4eba\u4f7f\u7528\u7684\u5de5\u4f5c\u7ad9\u3001\u670d\u52a1\u5668\u73af\u5883\uff0c\u5e76\u4e14\u81ea\u5df1\u4e5f\u4f5c\u4e3a\u666e\u901a\u7528\u6237\u8fdb\u884c\u65e5\u5e38\u4f7f\u7528\u3002
\n\u5176\u5b9e\u4e0a\u9762\u573a\u666f\u7684\u6838\u5fc3\u662f\uff1a\u5e73\u65f6\u4f1a\u4ee5\u666e\u901a\u7528\u6237\u8eab\u4efd\u4f7f\u7528Linux\uff0c\u56e0\u6b64\u7981\u7528root\u8d26\u6237\u662f\u63a8\u8350\u7684\uff0c\u4e0d\u5fc5\u8bb0\u4f4f\u4e24\u5957\u5bc6\u7801\u3002<\/p>\n

\u800c\u4ee5\u4e0b\u573a\u666f\u5219\u65e0\u987b\u7981\u7528root\u8d26\u6237\uff0c\u5426\u5219scp\u4e0a\u4f20\u7b49\u64cd\u4f5c\u4f1a\u5e26\u6765\u989d\u5916\u7684\u9ebb\u70e6\uff1a<\/p>\n

Linux\u7cfb\u7edf\u53ea\u6709\u4f60\u4e00\u4e2a\u4eba\u7528\uff0c\u5e76\u4e14\u7528\u4f5c\u670d\u52a1\u5668\uff0c\u505a\u7684\u90fd\u662f\u670d\u52a1\u5668\u7ba1\u7406\u548c\u8fd0\u7ef4\u64cd\u4f5c\uff1b
\n\u591a\u4eba\u4f7f\u7528\u573a\u666f\u4e0b\uff0c\u4f60\u662f\u8fd0\u7ef4\/\u7ba1\u7406\u5458\uff0c\u4e0d\u4f1a\u4ee5\u666e\u901a\u8eab\u4efd\u4f7f\u7528\u670d\u52a1\u5668\u3002
\n\u6ca1\u5fc5\u8981\u7981\u7528root\u8d26\u6237\u6838\u5fc3\u70b9\u662f\uff0c\u670d\u52a1\u5668\u7684\u7ba1\u7406\/\u8fd0\u7ef4\u4eba\u5458\uff0c\u4e0d\u4f1a\u4ee5\u666e\u901a\u8eab\u4efd\u4f7f\u7528\u670d\u52a1\u5668\u3002\u56e0\u4e3a\u7ef4\u62a4\u670d\u52a1\u5668\u76f8\u5bf9\u6765\u8bf4\u4f7f\u7528\u6b21\u6570\u8f83\u5c11\uff0c\u6bcf\u6b21\u4f7f\u7528\u51e0\u4e4e\u90fd\u8981\u8fd0\u884c\u7279\u6743\u547d\u4ee4\u3002<\/p>\n

\u5f53\u7136\uff0c\u65e0\u8bba\u662f\u5426\u7981\u7528root\u8d26\u6237\uff0c\u4ee5\u4e0b\u5b89\u5168\u64cd\u4f5c\u662f\u63a8\u8350\u7684\uff1a<\/p>\n

\u6709\u6761\u4ef6\u7684\u60c5\u51b5\u4e0b\u5c06\u670d\u52a1\u5668\u9694\u79bb\uff0c\u4f7f\u7528\u8df3\u677f\u673a\u6216\u8005VPN\u767b\u5f55\uff1b
\n\u66b4\u9732\u4e8e\u516c\u7f51\u73af\u5883\u7684\u670d\u52a1\u5668\uff0c\u4fee\u6539\u9ed8\u8ba4\u768422\u7aef\u53e3\uff1b
\n\u66b4\u9732\u4e8e\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u4fee\u6539\u4e3a\u5bc6\u94a5\u767b\u5f55\u6216\u8005\u5bc6\u7801\u52a0Google authenticator\/\u77ed\u4fe1\/token\u4e8c\u6b21\u6388\u6743\u767b\u5f55\uff1b
\n\u670d\u52a1\u5668\u91cd\u8981\u6570\u636e\u505a\u597d\u5907\u4efd\u3002<\/p>\n

\u53c2\u8003\u6587\u7ae0\uff1a<\/p>\n

su\u548csudo\u547d\u4ee4\u7684\u533a\u522b<\/a><\/p>\n

Linux\u5982\u4f55\u7981\u6b62\u4fee\u6539\u5bc6\u7801<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

\u5f88\u65e9\u4e4b\u524d\u5c31\u770b\u8fc7\u5173\u4e8eLinux\u5b89\u5168\u5efa\u8bae\u7684\u6587\u7ae0\uff0c\u5176\u4e2d\u6709\u4e00\u6761\u4fbf\u662f\uff1a\u7981\u7528root\u8d26\u6237\uff0c\u5e73\u65f6\u4f7f\u7528\u666e\u901a\u8d26\u53f7\uff0c\u5fc5\u8981\u65f6\u901a\u8fc7su […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,2],"tags":[337,1340],"class_list":["post-4202","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","category-wljs","tag-linux","tag-root"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/4202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=4202"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/4202\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=4202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=4202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=4202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}