{"id":85602,"date":"2020-05-12T10:57:50","date_gmt":"2020-05-12T02:57:50","guid":{"rendered":"http:\/\/4563.org\/?p=85602"},"modified":"2020-05-12T10:57:50","modified_gmt":"2020-05-12T02:57:50","slug":"%e5%85%b3%e4%ba%8e%e8%8e%b7%e5%8f%96-unix-%e7%b3%bb%e7%bb%9f%e7%9a%84%e7%94%a8%e6%88%b7-id","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=85602","title":{"rendered":"\u5173\u4e8e\u83b7\u53d6 unix \u7cfb\u7edf\u7684\u7528\u6237 id"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e\u83b7\u53d6 unix \u7cfb\u7edf\u7684\u7528\u6237 id               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vc131874 <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u5982\u679c\u7a0b\u5e8f\u901a\u8fc7\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\uff0c\u51fd\u6570 getuid()\u83b7\u53d6\u5230\u7684\u662f 0\uff0c\u4e5f\u5c31\u662f root \u7528\u6237\u7684 uid\uff0c\u4f46\u662f\u6211\u60f3\u8981\u83b7\u53d6\u767b\u5f55\u7528\u6237\u7684 uid\uff0c\u6709\u4ec0\u4e48\u597d\u7684\u65b9\u5f0f\u5417\uff1f\u6bd4\u5982\u6211\u7684\u767b\u9646\u7528\u6237\u662f xx\uff0c\u6211\u7684\u7a0b\u5e8f\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884c sudo .\/test \uff0c\u5728 test \u7a0b\u5e8f\u4e2d\u600e\u4e48\u83b7\u53d6 xx \u7684 uid \u3002      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>2<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1506753\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : crab <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/stackoverflow.com\/questions\/10272784\/how-do-i-get-the-users-real-uid-if-the-program-is-run-with-sudo                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1506754\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : vc131874 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @crab \u611f\u8c22\u56de\u590d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e\u83b7\u53d6 unix \u7cfb\u7edf\u7684\u7528\u6237 i&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\/85602"}],"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=85602"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85602\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}