{"id":180017,"date":"2020-10-26T10:07:08","date_gmt":"2020-10-26T02:07:08","guid":{"rendered":"http:\/\/4563.org\/?p=180017"},"modified":"2020-10-26T10:07:08","modified_gmt":"2020-10-26T02:07:08","slug":"%e6%b2%a1%e6%9c%89%e5%9c%a8-etc-passwd-%e9%87%8c%e7%9a%84%e7%94%a8%e6%88%b7%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9%e9%bb%98%e8%ae%a4-shell%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=180017","title":{"rendered":"\u6ca1\u6709\u5728\/etc\/passwd \u91cc\u7684\u7528\u6237\u5982\u4f55\u4fee\u6539\u9ed8\u8ba4 shell\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6ca1\u6709\u5728\/etc\/passwd \u91cc\u7684\u7528\u6237\u5982\u4f55\u4fee\u6539\u9ed8\u8ba4 shell\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MrLonely <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u4e0a\u641c\u4e86\u4e00\u5708\u51e0\u4e4e\u6240\u6709\u7684\u4fee\u6539\u65b9\u6cd5\u4e0d\u7ba1\u662f chsh \u8fd8\u662f usermod\uff0c\u5176\u5b9e\u6700\u7ec8\u90fd\u662f\u6539\u5230 \/etc\/passwd \u91cc\u4e86\u3002\u4f46\u662f\u6211\u8fd9\u4e2a\u7528\u6237\u53c8\u6ca1\u6709\u5728 \/etc\/passwd \u91cc\u3002\u5b66\u6821\u7684 Linux \u673a\u5668\u4e0d\u77e5\u9053\u7528\u7684\u4ec0\u4e48\u65b9\u6848\uff0c\u53cd\u6b63\u662f\u6bcf\u4e2a\u5b66\u751f\u7684 home directory \u653e\u5728\u4e00\u4e2a nfs \u4e0a\uff0c\u54ea\u4e2a\u5b66\u751f\u767b\u9646\u518d\u53bb\u6302\u8f7d\u3002\u9ed8\u8ba4\u662f bash\uff0c\u6211\u60f3\u6539\u6210 zsh\uff0c\u5e38\u89c1\u7684\u65b9\u6cd5\u90fd\u6539\u4e0d\u4e86\uff0c\u8fd8\u6709\u4ec0\u4e48\u65b9\u6cd5\u53ef\u4ee5\u6539\u5417\uff1f<\/p>\n<p>\u5f53\u7136\uff0csudo \u6743\u9650\u662f\u4e0d\u53ef\u80fd\u6709\u7684\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3937351\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6539 bash profile\uff0c\u542f\u52a8\u4e00\u4e0b zsh \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937352\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxalbert1996 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f LDAP \uff1f\u6ca1\u6709\u7ba1\u7406\u6743\u9650\u7684\u8bdd\u53ef\u4ee5\u7528\u4e2a\u8ba8\u5de7\u70b9\u7684\u65b9\u6cd5\uff0c\u5728 ssh \u7684 config \u91cc\u52a0\u4e0a\uff1a<br \/>RemoteCommand \/path\/to\/sh<br \/>RequestTTY yes                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937353\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : billlee <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ~\/.bash_profile \u91cc\u5199 exec -l zsh                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937354\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vk42 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5173\u952e\u770b\u4f60\u4eec\u5b66\u6821\u7528\u7684\u4ec0\u4e48\u9a8c\u8bc1\u7cfb\u7edf\uff0cchsh \u5e94\u8be5\u4e5f\u662f\u652f\u6301 ldap \u548c kerberos \u8fd9\u4e9b\u5e38\u89c1\u7684\u9a8c\u8bc1\u7cfb\u7edf\u7684\u3002\u4e0d\u8fc7\u4e2a\u4eba\u5efa\u8bae\u7528\u4e0a\u9762\u7684\u65b9\u6cd5\u4ece profile \u811a\u672c\u5207 shell\uff0c\u6bd5\u7adf zsh \u5f88\u591a\u670d\u52a1\u5668\u4e0d\u662f\u9ed8\u8ba4\u88c5\u7684\uff0c\u9047\u5230\u6ca1\u88c5\u7684\u5c31\u50bb\u773c\u4e86\u2026\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937355\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : march1993 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             TUM\uff0c\u7528\u7684 ldap\uff0c\u53ef\u4ee5\u5728 portal \u4e0a\u4fee\u6539 shell \u3002\u4f46\u662f\u597d\u50cf\u6ca1\u7ed9\u5b66\u751f\u5f00\u653e\u8fd9\u4e2a\u6743\u9650\uff0c\u53ea\u80fd bash \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937356\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CEBBCAT <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u867d\u7136\u77e5\u9053\u7b54\u6848\uff0c\u4f46\u641c\u5230\u8fd9\u4e2a\u95ee\u7b54\u8fd8\u662f\u9887\u8d39\u4e86\u4e00\u756a\u529f\u592b\uff0c\u597d\u83dc\u2026\u2026<\/p>\n<p>https:\/\/unix.stackexchange.com\/questions\/136423\/making-zsh-default-shell-without-root-access                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3937357\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLonely <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u540e\u6765\u53d1\u73b0\u7ed9\u5b66\u6821 Lab \u53d1\u4e2a\u5de5\u5355\u5c31\u53ef\u4ee5\u4e86\u3002\u8c22\u8c22\u51e0\u4f4d\u8001\u54e5\u7684\u89e3\u7b54\u3002\u8fd9\u4e9b\u65b9\u6848\u7559\u7740\u4ee5\u540e\u518d\u5b66\u4e60\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6ca1\u6709\u5728\/etc\/passwd \u91cc\u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/180017"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180017"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/180017\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180017"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}