{"id":294234,"date":"2024-11-09T04:03:27","date_gmt":"2024-11-08T20:03:27","guid":{"rendered":"https:\/\/lrxjmw.cn\/udluwjmmjblx.html"},"modified":"2024-11-09T04:03:27","modified_gmt":"2024-11-08T20:03:27","slug":"udluwjmmjblx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/udluwjmmjblx.html","title":{"rendered":"ubuntu \u767b\u5f55 Ubuntu \u5fd8\u8bb0\u5bc6\u7801\u8fdb\u4e0d\u4e86\u7cfb\u7edf\uff1f\u6559\u4f60\u4e00\u62db\u8f7b\u677e\u89e3\u51b3"},"content":{"rendered":"
Ubuntu\u5fd8\u6389\u5bc6\u7801\uff0c\u8fdb\u4e0d\u4e86\u7cfb\u7edf\u7684\u89e3\u51b3\u65b9\u5f0f1\u3001\u5728\u4e0d\u767b\u5165\u60c5\u51b5\u4e0b\uff0c\u83b7\u5f97root\u6743\u9650\u82e5\u679c\u6ca1\u6709\u8bbe\u7f6eGRUB\u5bc6\u7801\uff0c\u90a3\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6700\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u9996\u5148\u542f\u52a8\u7b14\u8bb0\u672c\uff0c\u7b49\u5f85GRUB\u83dc\u5355\uff0c\u5047\u5982GRUB\u83dc\u5355\u9690\u85cf\uff0c\u6309\u5de6[Shift]\u952e\u5f53\u5c4f\u5e55\u4e0a\u51fa\u73b0PressEsctoentergrubmessage\u65f6\u7acb\u5373\u6309\u4e0bEsc\u952e\u8c03\u51fa\uff0c\u9009\u62e9Ubuntu,*-*(recoverymode)\uff0c\u4e5f\u5c31\u662f\u201c\u6062\u590d\u6a21\u5f0f\u201d\u6309Enter\u542f\u52a8\u5c31\u53ef\u4ee5\u4e86\u3002\u9009\u62e9recover\u6a21\u5f0f\u4ee5\u540e\uff0c\u4e4b\u540e\u518d\u9009\u62e9\u5176\u4e2d\u5bcc\u542broot\u7684\u90e8\u4efdubuntu \u767b\u5f55<\/strong>\uff0c\u8fd9\u6837\u4fbf\u80fd\u6b65\u5165root\u7528\u6237\u3002\u4e4b\u540e\u5982\u4e0b\uff1a#passwd\u8f93\u5165\u65b0\u7684root\u5bc6\u7801#passwdwang\u8f93\u5165wangt\u65b0\u7684\u5bc6\u7801#reboot\u8fd9\u6837\uff0c\u91cd\u65b0\u542f\u52a8\u4ee5\u540e\uff0c\u624d\u80fd\u4f7f\u7528\u521a\u624d\u8bbe\u7f6e\u7684\u5bc6\u7801\u8fdb\u884c\u767b\u5f55\u4e86\u3002\u53e6\u5916\u4e00\u4e2a\u529e\u6cd5\u662f\u7528Ubuntu\u5b89\u88c5\u76d8\u83b7\u5f97root\u6743\u9650\uff0c\u7528Ubuntu\u5b89\u88c5\u76d8\u542f\u52a8\u7b14\u8bb0\u672c\uff0c\u5f53\u663e\u793a\u201cboot:\u201d\u65f6\uff0c\u8f93\u5165\u201crescue\u201dboot:rescue\u6309\u5c4f\u5e55\u63d0\u793a\u64cd\u4f5c\u5c31\u53ef\u4ee5\u83b7\u53d6root\u6743\u9650\u4e86\u4e4b\u540e#passwdroot\u65b0\u5bc6\u7801#vi\/etc\/X11\/gdm\/gdm.conf#\u6253\u5f00gnome\u7684\u914d\u7f6e\u6587\u4ef6,\u5728\u672b\u884c\u6a21\u5f0f\u4e2d\u8f93\u5165\uff1aAllowRoot\u56de\u8f66\uff0c\u627e\u5230AllowRoot\uff1dfalse,\u628afalse\u6539\u4e3atrue\uff0c\u4fdd\u5b58\u540e\u9000\u51fa\u3002<\/p>\n \u7136\u540e\uff0c\u91cd\u542f\u7cfb\u7edf\u65f6\uff0c\u5c31\u53ef\u4ee5\u7528root\u767b\u9646\u4e86\u3002\u5047\u5982\u4f60\u60f3\u8981\u7981\u7528root\u8d26\u53f7\uff0c\u5219\u6267\u884c\u4e0b\u8ff0\u547d\u4ee4<\/a>\uff1a$sudopasswd-lroot\u88c5\u4e86ubuntu\u540e\uff0c\u6709\u6b21\u5fd8\u4e86\u5bc6\u7801\uff0c\u5c31\u91cd\u88c5\u7cfb\u7edf\u543c\u4e86\uff0c\u540e\u6765\u53c8\u6709\u4e2a\u670b\u53cb\u4e5f\u5fd8\u4e86\u5bc6\u7801\uff0c\u5c31\u4ece\u7f51\u4e0a\u627e\u5230\u4e86\u89e3\u51b3\u529e\u6cd5\uff0c\u5982\u4eca\u5206\u4eab\u5982\u4e0b\uff1a1.\u5f00\u673a\u6b65\u5165grub\u65f6\uff0c\u7528\u4e0a\u4e0b\u952e\u79fb\u5230\u7b2c\u4e8c\u884c\u7684\u6062\u590d\u6a21\u5f0f\uff0c\u6309e\uff08\u6ce8\u610f\u4e0d\u662f\u56de\u8f66\uff092.\u628arosingle\u6539\u6210rwsingleinit=\/bin\/bash\uff0c\u4e4b\u540e\u6309ctrl+x\uff0c\u5c31\u53ef\u4ee5\u6b65\u5165\u5355\u7528\u6237\u6a21\u5f0f\uff0c\u8fdb\u53bb\u5e72\u54ea\u4e9b\u90fd\u884c\u4e86\u3002\uff08\u8fdb\u53bb\u662f\u547d\u4ee4\u884c\uff0c\u6240\u4ee5\u4f60\u5f97\u8981\u61c2\u4f7f\u7528\u547d\u4ee4\u884c\uff01\uff09\u6211\u4eec\u53ef\u4ee5\u66f4\u6539\u666e\u901a\u7528\u6237\u5bc6\u7801\uff0c\u4e5f\u53ef\u4ee5\u6539root\u5bc6\u7801\u3002\u63d0\u793alinux\u5220\u9664\u547d\u4ee4\uff0c\u5b8c\u6210\u540e\uff0c\u6309\u201dctrl+alt+delete\u201c\u7ec4\u5408\u795e\u952e\u91cd\u542f\uff08\u6211\u8bd5\u8fc7\u7528\u547d\u4ee4\u6b7b\u673a\uff0c\u91cd\u542f\u90fd\u4e0d\u884c\uff0c\u53ea\u80fd\u7528\u8fd9\u4e2a\uff09\u3002\u90a3\u4e9b\u6211\u90fd\u662f\u8bd5\u8fc7\u7684\uff0c\u4e5f\u662f\u6210\u529f\u7684\uff0c\u4f60\u8bd5\u8bd5\u5427\uff01\u6211\u770b\u8fc7\u4e00\u4e9b\u7f51\u4e0a\u7684\u4e00\u4e9b\u6280\u5de7\uff0c\u4e5f\u8bd5\u8fc7\uff0c\u662f\u4e0d\u884c\u7684\uff01\u4e00\u4e9b\u662f\u7528\u7ea2\u5e3d\u7cfb\u7edf\u7cfb\u5217\u7684\u65b9\u5f0f\uff0c\u4e00\u4e9b\u662f\u67d0\u4e2a\u6b65\u9aa4\u4e0d\u5bf9\uff01\u66f4\u6539\u666e\u901a\u7528\u6237\u5bc6\u7801\uff0c\u547d\u4ee4\u5982\u4e0b\u683c\u5f0f\uff1a#passwd\u7528\u6237\u540d\u6211\u8981\u6295\u7a3f\u5047\u5982\u8c01\u8bf4\u4ed6\u7684Linux<\/a>\u4ece\u6765\u6ca1\u6709\u78b0\u5230\u201c\u7591\u96be\u6742\u75c7\u201d\uff0c\u6211\u8ba4\u4e3a\u662f\u4e0d\u53ef\u4fe1\u7684\uff0c\u5373\u4f7f\u662f\u64cd\u4f5c\u754c\u9762\u6700\u53cb\u597d\u7684WindowXP\u4e5f\u7ecf\u5e38\u78b0\u5230\u5404\u7c7b\u5404\u6837\u7684\u95ee\u9898\uff0c\u6709\u7684\u95ee\u9898\u5b9e\u5728\u79bb\u5947\u5230\u53ea\u6709\u66f4\u6362\u786c\u4ef6\u80fd\u591f\u89e3\u51b3\uff01Linux\u4e5f\u662f\u8fd9\u6837\u7684\uff0c\u4f46\u662f\u4ed6\u7684\u81ea\u7531\u6027\uff0c\u66f4\u662f\u52a0\u5f3a\u51fa\u95ee\u9898\u7684\u9891\u7e41\u7a0b\u5ea6\u3002<\/p>\n <\/p>\n \u5176\u5b9e\u4e5f\u662f\u56e0\u4e3aLinux\u5f00\u6e90\u7684\u7279\u6027\uff0c\u4e0d\u7ba1\u51fa\u4e86\u54ea\u4e9b\u95ee\u9898\uff0c\u4f60\u90fd\u53ef\u4ee5\u5728\u6e90\u4ee3\u7801\u7ea7\u627e\u5230\u6839\u6e90\u6240\u5728\uff0c\u8fd9\u6b63\u662fLinux\u9b45\u529b\u6240\u5728\u30022\u3001\u901a\u8fc7\u6539\u53d8\u5185\u6838\u542f\u52a8\u53c2\u6570\u83b7\u5f97\u6839\u6743\u9650\u542f\u52a8\u7b14\u8bb0\u672c\uff0c\u7b49\u5f85GRUB\u83dc\u5355\uff0c\u5047\u5982GRUB\u83dc\u5355\u9690\u85cf\uff0c\u53ef\u4ee5\u6309Esc\u8c03\u51fa\uff0c\u5047\u5982\u8bbe\u7f6e\u4e86GRUB\u5bc6\u7801\uff0c\u6309p\u6765\u89e3\u9501linux\u64cd\u4f5c\u7cfb\u7edf\u597d\u5417\uff0c\u4f8b\u5982\u6211\u4eec\u9009\u62e9\u4e86Ubuntu,kernel2.6.12-8-386\uff0c\u6309e\u5728\u542f\u52a8\u524d\u7f16\u8f91\u542f\u52a8\u53c2\u6570\uff0c\u9009\u62e9kernel\/boot\/vmlinuz-2.6.12-8-386root=\/dev\/hda2roquietsplash\uff0c\u6309e\u7f16\u8f91\u9009\u53d6\u7684\u542f\u52a8\u83dc\u5355\u9879\uff0c\u5728\u53c2\u6570\u6700\u540e\u6dfb\u52a0rwinit=\/bin\/bash\uff0c\u5373\u6539\u4e3a\u5982\u4e0b\u547d\u4ee4\u884c\uff1agrubeditkernel\/boot\/vmlinuz-2.6.12-8-386root=\/dev\/hda2roquietsplashrwinit=\/bin\/bash\u6309b\u542f\u52a8\u5373\u53ef\u30023\u3001\u5fd8\u8bb0\u4e86root\u7528\u6237\/\u4e3b\u7528\u6237\u5bc6\u7801\u6839\u636e\u7b2c\u4e00\u9879\uff1a\u5728\u4e0d\u767b\u5165\u60c5\u51b5\u4e0b\uff0c\u83b7\u5f97root\u6743\u9650\u540e\uff0c\u5728\u547d\u4ee4\u884c\u8f93\u5165\uff1apasswdroot\u6839\u636e\u63d0\u793a\uff0c\u8f93\u5165\u4e24\u6b21\u5bc6\u7801\u5c31\u53ef\u4ee5\u8bbe\u5b9aroot\u7528\u6237\u5bc6\u7801\u4e86.\u8981\u4fee\u6539\u4e3b\u7528\u6237\u5bc6\u7801\uff1apasswdsystem_main_username\u6839\u636e\u63d0\u793a\uff0c\u8f93\u5165\u4e24\u6b21\u5bc6\u7801\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n <\/p>\n \u6211\u4eec\u5c31\u5047\u5b9a\u4f60\u5728\u88c5Ubuntu\u7684\u6c42\u5feb\u4e0d\u5728\u4e4e\u968f\u610f\u8f93\u5165\u4e00\u4e32\u5b57\u7b26\u5bc6\u7801\u540e\u6765\u542f\u52a8\u7684\u65f6\u4faf\u53c8\u5fd8\u4e86\uff0c\u6216\u5219\u6bd4\u8f83\u4e45\u6ca1\u5f00\u673a\u628a\u7528\u6237\u5bc6\u7801\u7ed9\u5fd8\u4e86\u6216\u5176\u4ed6\u54ea\u4e9b\u7f18\u7531\u3002\u8fd9\u65f6\u4faf\u60a8\u53ef\u4ee5\u9996\u5148\u60f3\u7684\u662f\u82b1\u51e0\u5341\u5206\u949f\u91cd\u88c5\u4e00\u6b21\u7cfb\u7edf\u3002\u4f46\u8fd9\u6837\u53c8\u8d39\u65f6\u95f4\uff0c\u53c8\u628a\u539f\u5148\u7684\u597d\u591a\u6570\u636e\u90fd\u9057\u5931\u6389\u3002\u4f46\u6709\u4e00\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5728\u60a8\u7684\u7b14\u8bb0\u672c\u542f\u52a8\u65f6\u7ecf\u8fc7\u7b80\u5355\u76845\u6b65\u5c31\u53ef\u4ee5\u66f4\u6539\u60a8\u5fd8\u6389\u7684\u5bc6\u7801ubuntu \u767b\u5f55<\/strong>\uff0c\u662f\u4e0d\u662f\u5f88\u4fbf\u6377\uff1f1\uff0e2\uff0e\u4e4b\u540e\u624d\u4f1a\u51fa\u73b0\u4e09\u4e2a\u9009\u9879\uff0c\u60a8\u9009\u62e9recoverymode\u6309\u56de\u8f66\uff08\u5982\u56fe\uff11\u6240\u793a\uff09\u30023\uff0e\u60a8\u7684\u7b14\u8bb0\u672c\u5c06\u4f1a\u4ece\u542f\u52a8\u6b65\u5165\u5230shell\uff0c\u5f53\u51fa\u73b0\u547d\u4ee4\u63d0\u793a\u7b26\u7684\u65f6\u4faf\u8f93\u5165passwdusername\u8fd9\u513f\u7684username\u5c31\u662f\u60a8\u7684\u7528\u6237\u540d\uff0c\u5018\u82e5\u60a8\u8fde\u7528\u6237\u540d\u90fd\u5fd8\u4e86\u7684\u8bdd\uff0c\u4e0d\u6025\u6709\u529e\u6cd5\uff0c\u60a8\u53ef\u4ee5\u5148\u8f93\u5165ls\/home\u67e5\u770b\u7528\u6237\u540d\uff0c\u518d\u8f93\u5165\u4ee5\u4e0a\u547d\u4ee4\u30024\uff0e\u51fa\u73b0\u63d0\u793a\u7b26\u65f6\u5c31\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165\u60a8\u7684\u65b0\u5bc6\u7801\u4e86\uff0c\u518d\u786e\u8ba4\u4e00\u6b21\u30025\uff0e\u8fd9\u65f6\u518d\u8f93\u5165shutdown-rnow\u91cd\u542f\u60a8\u7684\u7b14\u8bb0\u672c\uff0c\u7528\u60a8\u7684\u65b0\u5bc6\u7801\u6b65\u5165\u5566\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u90a3\u4e48\u7b80\u5355\u7684\u65b9\u5f0f\u8981\u5bf9\u91cd\u88c5\u7cfb\u7edf\u4fbf\u6377\u5f97\u591a\u3002\u56fe1\u5f53\u6b65\u5165\u8bbe\u7f6e\u65f6\u9009\u62e9recoverymodeUbuntu\u5bc6\u7801\u5fd8\u6389\u4e86\u5982\u4f55\u529e\uff1f\u7248\u672c\uff1aUbuntu11.10\u601d\u8def\u662f\u6b65\u5165root\u4e2d\uff0c\u4e4b\u540e\u4f7f\u7528passwd\u66f4\u6539\u81ea\u5df1\u7684\u5bc6\u7801\u3002\u5047\u5b9a\u7528\u6237\u540d\uff1aquietheart\u7ecf\u8fc7\u7f51\u4e0a\u67e5\u8be2\uff0c\u5047\u5982\u5b89\u88c5\u7cfb\u7edf\u4ee5\u540e\u6ca1\u6709\u8bberoot\u5bc6\u7801\uff0c\u8fd9\u4e48\uff0cUbuntu11.10\u7684root\u5bc6\u7801\u662f\u6bcf\u6b21\u542f\u52a8\u7684\u65f6\u4faf\u968f\u673a\uff0c\u6240\u4ee5\u9996\u5148\u6700\u597d\u8981\u5c06root\u7528\u6237\u7684\u5bc6\u7801<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" \u767b\u5f55\u4e86\u3002\uff09\u6211\u4eec\u53ef\u4ee5\u4fee\u6539\u666e\u901a\u7528\u6237\u5bc6\u7801\uff0c\u4e5f\u53ef\u4ee5\u6539root\u5bc6\u7801\u3002\u6309\u7167\u63d0\u793a\uff0c\u8f93\u5165\u4e24\u6b21\u5bc6\u7801\u5c31\u53ef\u4ee5\u4e86\u3002now\u91cd\u542f\u60a8\u7684\u7535\u8111\uff0c\u7528\u60a8\u7684\u65b0\u5bc6\u7801\u8fdb\u5165\u5566\u3002modeUbuntu\u5bc6\u7801\u5fd8\u8bb0\u4e86\u600e\u4e48\u529e\uff1f\u601d\u8def\u662f\u8fdb\u5165root\u4e2d\uff0c\u7136\u540e\u4f7f\u7528passwd\u4fee\u6539\u81ea\u5df1\u7684\u5bc6\u7801\u3002<\/p>\n","protected":false},"author":1,"featured_media":294235,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[1043,4144,81,4143],"class_list":["post-294234","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-g","tag-ryh-2","tag-ubuntu","tag-mmzz"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294234","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=294234"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294234\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/294235"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=294234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=294234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=294234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}