{"id":1654,"date":"2019-05-02T23:37:41","date_gmt":"2019-05-02T15:37:41","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1654"},"modified":"2022-06-17T14:39:41","modified_gmt":"2022-06-17T06:39:41","slug":"id","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/id","title":{"rendered":"id\u547d\u4ee4 – \u663e\u793a\u7528\u6237\u4e0e\u7528\u6237\u7ec4\u4fe1\u606f"},"content":{"rendered":"\n

id\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u663e\u793a\u7528\u6237\u4e0e\u7528\u6237\u7ec4\u4fe1\u606f\u3002UID\u662f\u6307\u7528\u6237\u8eab\u4efd\u7684\u552f\u4e00\u8bc6\u522b\u53f7\u7801\uff0c\u76f8\u5f53\u4e8e\u4eba\u7c7b\u793e\u4f1a\u7684\u8eab\u4efd\u8bc1\u53f7\u7801\uff0c\u800cGID\u5219\u6307\u7528\u6237\u7ec4\u7684\u552f\u4e00\u8bc6\u522b\u53f7\u7801\uff0c\u7528\u6237\u4ec5\u6709\u4e00\u4e2a\u57fa\u672c\u7ec4\uff0c\u4f46\u53ef\u4ee5\u6709\u591a\u4e2a\u6269\u5c55\u7ec4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f<\/strong>\uff1aid [\u53c2\u6570] \u7528\u6237\u540d<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570<\/strong>\uff1a<\/p>\n\n\n\n

-g<\/td>\u663e\u793a\u7528\u6237\u6240\u5c5e\u7fa4\u7ec4\u7684ID<\/td><\/tr>
-G<\/td>\u663e\u793a\u7528\u6237\u6269\u5c55\u7fa4\u7ec4\u7684ID<\/td><\/tr>
-n<\/td>\u663e\u793a\u7528\u6237\u6240\u5c5e\u7fa4\u7ec4\u6216\u6269\u5c55\u7fa4\u7ec4\u7684\u540d\u79f0<\/td><\/tr>
-r<\/td>\u663e\u793a\u5b9e\u9645ID<\/td><\/tr>
-u<\/td>\u663e\u793a\u7528\u6237ID<\/td><\/tr>
--help<\/td>\u663e\u793a\u5e2e\u52a9<\/td><\/tr>
--version<\/td>\u663e\u793a\u7248\u672c\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong>\uff1a<\/p>\n\n\n\n

\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u8eab\u4efd\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# id<\/strong>\r\nuid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023\r<\/pre>\n\n\n\n

\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u6240\u5c5e\u7fa4\u7ec4GID\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# id -g<\/strong>\n0<\/pre>\n\n\n\n

\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u8eab\u4efd\u7801UID\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# id -u<\/strong>\n0<\/pre>\n\n\n\n

\u67e5\u8be2\u5f53\u524d\u7528\u6237\u7684\u8eab\u4efd\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# id linuxprobe<\/strong>\r\nuid=1000(linuxprobe) gid=1000(linuxprobe) groups=1000(linuxprobe)\r<\/pre>\n","protected":false},"excerpt":{"rendered":"

id\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u663e\u793a\u7528\u6237\u4e0e\u7528\u6237\u7ec4\u4fe1\u606f\u3002UID\u662f\u6307\u7528\u6237\u8eab\u4efd\u7684\u552f\u4e00\u8bc6\u522b\u53f7\u7801\uff0c\u76f8\u5f53\u4e8e\u4eba\u7c7b\u793e\u4f1a\u7684\u8eab\u4efd\u8bc1\u53f7\u7801\uff0c\u800cGI […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1654"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=1654"}],"version-history":[{"count":17,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1654\/revisions"}],"predecessor-version":[{"id":10294,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1654\/revisions\/10294"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}