{"id":5118,"date":"2022-04-01T11:47:02","date_gmt":"2022-04-01T03:47:02","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=5118"},"modified":"2022-04-01T11:47:02","modified_gmt":"2022-04-01T03:47:02","slug":"centos%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9root%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/5118.html","title":{"rendered":"centos\u5982\u4f55\u4fee\u6539root\u7528\u6237\u5bc6\u7801"},"content":{"rendered":"

centos\u5982\u4f55\u4fee\u6539root\u7528\u6237\u5bc6\u7801<\/p>\n

\u7b2c\u4e00\u79cd\u60c5\u51b5\uff0c\u5982\u679c\u77e5\u9053\u65e7\u5bc6\u7801\uff0c\u53ef\u4ee5\u767b\u5f55\uff0c\u5219\u4f7f\u7528\u547d\u4ee4\u4fee\u6539\u5c31\u884c\u4e86\uff0c\u4fee\u6539\u5373\u523b\u751f\u6548\uff0c\u4e0d\u9700\u8981\u91cd\u542f<\/p>\n

1.\u4fee\u6539\u7cfb\u7edf\u7528\u6237root\u5bc6\u7801<\/p>\n

\u7528ssh\u767b\u5f55\u7cfb\u7edf\u540e\uff0c\u8f93\u5165passwd<\/p>\n

\"\"<\/a>
\n\u7136\u540e\u8f93\u5165\u4f60\u7684\u65b0\u5bc6\u7801\uff0c\u8f93\u5165\u5bc6\u7801\u65f6\u5149\u6807\u4e0d\u4f1a\u6709\u4efb\u4f55\u53d8\u5316 \u3002\u8f93\u5165\u5b8c\u6210\u540e\uff0c\u76f4\u63a5\u56de\u8f66\u5c31\u884c\u4e86\u3002<\/p>\n

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

\u7136\u540e\uff0c\u8ba9\u4f60\u518d\u8f93\u5165\u4e00\u6b21\u3002\u6211\u8fd9\u8fb9\u7531\u4e8e\u8f93\u5165\u5bc6\u7801\u91cc\u5e26\u6709\u7279\u6b8a\u5b57\u7b26\uff0c\u6240\u4ee5\u63d0\u793a\u6709\u9519\u8bef\u3002\u4e0d\u8fc7\u3002\u4ecd\u7136\u662f\u4fee\u6539\u6210\u529f\u4e86\u3002<\/p>\n

2.\u4fee\u6539\u7cfb\u7edf\u975eroot\u7528\u6237\u5bc6\u7801\uff1a\u6bd4\u5982\u7528\u6237\u662fbst<\/p>\n

[root@192-168-10-106 ~]# cat \/etc\/passwd \/\/\u67e5\u770b\u5f53\u524d\u6240\u6709\u7528\u6237\uff0c\u81ea\u5df1\u521b\u5efa\u7684\u7528\u6237\uff0c\u5728\u6700\u540e<\/p>\n

......<\/p>\n

bst:x:1000:1000:BST\/home\/bst:\/bin\/bash<\/p>\n

[root@192-168-10-106 ~]# passwd bst
\n\u66f4\u6539\u7528\u6237bst\u7684\u5bc6\u7801 \u3002
\n\u65b0\u7684\u5bc6\u7801<\/p>\n

END<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

centos\u5982\u4f55\u4fee\u6539root\u7528\u6237\u5bc6\u7801 \u7b2c\u4e00\u79cd\u60c5\u51b5\uff0c\u5982\u679c\u77e5\u9053\u65e7\u5bc6\u7801\uff0c\u53ef\u4ee5\u767b\u5f55\uff0c\u5219\u4f7f\u7528\u547d\u4ee4\u4fee\u6539\u5c31\u884c\u4e86\uff0c\u4fee\u6539\u5373\u523b\u751f\u6548 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1015,1643,1644,1642],"class_list":{"0":"post-5118","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-web","7":"tag-centos","8":"tag-centosroot","10":"tag-root"},"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5118","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=5118"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/5118\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=5118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=5118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=5118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}