{"id":117417,"date":"2018-09-02T08:02:07","date_gmt":"2018-09-02T00:02:07","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=117417"},"modified":"2018-08-27T11:03:34","modified_gmt":"2018-08-27T03:03:34","slug":"ubuntu-root-login","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ubuntu-root-login.html","title":{"rendered":"\u5b9e\u4f8b\uff1aUbuntu \u914d\u7f6e\u5355root\u7528\u6237\u767b\u5f55"},"content":{"rendered":"

\u73af\u5883\u642d\u5efa\u597d\u540e\uff0c\u7528\u521b\u5efa\u7684\u7528\u6237\u8fdb\u5165\u7cfb\u7edf<\/p>\n

shell\u547d\u4ee4<\/strong><\/span><\/div>\n
\r\nsudo vim usr\/share\/lightdm.conf.d\/50-ubuntu.conf \/\/\u7f16\u8f91\u5668\u4e0d\u9650\r\n[SeatDefaults]\r\nuser-session=ubuntu\r\ngreeter-show-manual-login=true     #\u624b\u5de5\u8f93\u5165\u767b\u5f55\u7cfb\u7edf\u7684\u8d26\u53f7\u5bc6\u7801\r\nallow-guest=false                  #\u7981\u6b62guest\u767b\u5f55\r\n<\/pre>\n
\u4fee\u6539root\u5bc6\u7801<\/strong><\/span><\/div>\n
\r\nsudo passwd root\r\n<\/pre>\n
\u4fee\u6539\/root\/.profile<\/strong><\/span><\/div>\n
\r\nsudo vim \/root\/.profile \/\/root\u9996\u6b21\u767b\u5f55\u4f1a\u62a5\u9519\u89e3\u51b3\u65b9\u6cd5\r\n# ~\/.profile: executed by Bourne-compatible login shells.\r\n\r\nif [ \"$BASH\" ]; then\r\n\r\nif [ -f ~\/.bashrc ]; then\r\n\r\n. ~\/.bashrc\r\n\r\nfi\r\n\r\nfi\r\n<\/pre>\n

#mesg n \u6ce8\u91ca\u6389mesg n \u589e\u52a0\u4e00\u884ctty -s && mesg n<\/p>\n

\r\ntty -s && mesg n\r\n<\/pre>\n
\u4fee\u6539ssh\u914d\u7f6e\u6587\u4ef6\u5141\u8bb8root\u767b\u5f55<\/strong><\/span><\/div>\n
\r\nsudo vim \/etc\/ssh\/sshd_config\r\n#permitRootLogin without-password \u6ce8\u91ca\u6389\u8fd9\u884c\uff0c\u65b0\u589e\u4e0b\u9762\u4e00\u884c\r\npermitRootLogin yes\r\n<\/pre>\n

\u91cd\u542fssh\u670d\u52a1\u5373\u53ef<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/wuxiaobai.win\/archives\/36<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/ubuntu-root-login.html<\/a>\u7f16\u8f91\uff1a\u5411\u91d1\u5e73\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u73af\u5883\u642d\u5efa\u597d\u540e\uff0c\u7528\u521b\u5efa\u7684\u7528\u6237\u8fdb\u5165\u7cfb\u7edf shell\u547d\u4ee4 sudo vim usr\/share\/lightdm.co […]<\/p>\n","protected":false},"author":1482,"featured_media":44966,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-117417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/117417","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\/1482"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=117417"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/117417\/revisions"}],"predecessor-version":[{"id":117734,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/117417\/revisions\/117734"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/44966"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=117417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=117417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=117417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}