{"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
\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