{"id":275351,"date":"2023-06-19T20:06:25","date_gmt":"2023-06-19T12:06:25","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxrhzklyhzdy.html"},"modified":"2023-06-19T20:06:25","modified_gmt":"2023-06-19T12:06:25","slug":"lxrhzklyhzdy","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxrhzklyhzdy.html","title":{"rendered":"linux\u4e0b\u5982\u4f55\u67e5\u770blinux\u7528\u6237\u7ec4\u5bf9\u5e94\u7684\u77e5\u8bc6\u70b9"},"content":{"rendered":"

\u672c\u7bc7\u6587\u7ae0\u7ed9\u4f60\u4eec\u8bf4\u8bf4linux\u4e0b\u600e\u6837\u67e5\u770b\u7ec4\uff0c\u4ee5\u53ca\u600e\u6837\u67e5\u770blinux\u7528\u6237\u7ec4\u5bf9\u5e94\u7684\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5bf9\u8bf8\u4f4d\u6709\u6240\u5e2e\u52a9linux \u67e5\u770b\u7528\u6237\u7ec4<\/strong>\uff0c\u4e0d\u8981\u5fd8\u4e86\u6536\u85cf\u672c\u7ad9\u5594\u3002<\/p>\n

\u672c\u6587\u76ee\u5f55\u4e00\u89c8\uff1alinux\u5982\u4f55\u67e5\u770b\u7528\u6237\u7ec4\u548c\u7528\u6237<\/p>\n

1\u3001\u9996\u5148\u6253\u5f00\u7ec8\u7aef\uff08\u8fd9\u513f\u662fUbuntu\u7cfb\u7edf<\/a>\uff09linux\u7cfb\u7edf\u600e\u4e48\u6837\uff0c\u5176\u4ed6\u7684\u6253\u5f00\u547d\u4ee4<\/a>\u754c\u9762\u5373\u53ef<\/p>\n

2\u3001\u7136\u540e\u8f93\u5165\u547d\u4ee4\u884ccat\/etc\/passwd\uff0c\u76f4\u63a5\u6309\u4e0b\u56de\u8f66\u952e\u5373\u53ef<\/p>\n

3\u3001\u7136\u540e\u8fd9\u513f\u90fd\u4f1a\u663e\u793a\u597d\u591a\u7684\u4fe1\u606f\uff0c\u6240\u6709\u7684\u7528\u6237\u90fd\u5728\u8fd9\u513f\u9762\u4e86<\/p>\n

4\u3001\u7136\u540e\u5c31\u662f\u67e5\u770b\u6240\u6709\u7684\u7ec4\uff0c\u540c\u6837\u7684\u65b9\u5f0f\uff0c\u952e\u5165\u547d\u4ee4\u884ccat\/etc\/group\u4e4b\u540e\u56de\u8f66<\/p>\n

5\u3001\u7136\u540e\u7cfb\u7edf\u4e2d\u6240\u6709\u7684\u7ec4\u5c31\u4f1a\u663e\u793a\u4e0b\u6765\u4e86\uff0c\u548c\u7528\u6237\u4e00\u6837\uff0c\u6700\u540e\u4e00\u4e2a\u662f\u6211\u521a\u624d\u521b\u5efa\u7684\u54e6<\/p>\n

6\u3001\u4f7f\u7528\u547d\u4ee4\u884cgroups\u7528\u6237\u540d\uff0c\uff0c\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5728\u7ec4\uff0c\u4ee5\u53ca\u7ec4\u5185\u5176\u4ed6\u6210\u5458\u7684\u4fe1\u606f\u54e6<\/p>\n

linux\u67e5\u770bftp\u7528\u6237_linux \u67e5\u770b\u7528\u6237\u7ec4_linux \u67e5\u770broot\u7ec4\u7528\u6237<\/p>\n

linux\u5982\u4f55\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u4ec0\u4e48\u7ec4<\/p>\n

linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\u6709\u597d\u591a\u65b9\u5f0f\uff1a<\/p>\n

1.\u547d\u4ee4groups\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5c5e\u7ec4<\/p>\n

2.groups\u7528\u6237\uff08\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff09<\/p>\n

3.id\u7528\u6237(\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff09<\/p>\n

4.\u76f4\u63a5\u67e5\u770b\u7ec4\u6587\u4ef6\uff0cmore\/etc\/group\u7ec4\u7528\u6237<\/p>\n

Linux<\/a>\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7684\u7ec4\u7684\u547d\u4ee4\uff1f<\/p>\n

Linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7684\u7ec4\u7684\u547d\u4ee4\u7684\u65b9\u5f0f\u3002<\/p>\n

\u5982\u4e0b\u53c2\u8003\uff1a<\/p>\n

1\uff0e\u9996\u5148\u6253\u5f00\u7ec8\u7aef\uff08\u5728\u672c\u4f8b\u4e2d\u662fUbuntu\u7cfb\u7edf\uff09\uff0c\u4e4b\u540e\u4e3a\u5176\u6253\u5f00\u547d\u4ee4\u754c\u9762\u3002<\/p>\n

2\uff0e\u4e4b\u540e\u8f93\u5165\u547d\u4ee4\u884ccat\uff0fetc\uff0fpasswdlinux \u67e5\u770b\u7528\u6237\u7ec4<\/strong>\uff0c\u76f4\u63a5\u6309enter\u952e\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n

3\uff0e\u4e4b\u540e\u4f1a\u6709\u597d\u591a\u4fe1\u606f\u663e\u793a\u5728\u8fd9\u513f\uff0c\u6240\u6709\u7684\u7528\u6237\u5c31\u4f1a\u5728\u8fd9\u513f\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n

4\uff0e\u4e4b\u540e\u77a7\u77a7\u6240\u6709\u7684\u7ec4\uff0c\u505a\u540c\u6837\u7684\u4e8b\u60c5\uff0c\u8f93\u5165\u547d\u4ee4\u884ccat\uff0fetc\uff0fgroup\u5e76\u6309\u56de\u8f66\uff0c\u5982\u4e0b\u6240\u793a\u3002<\/p>\n

5\uff0e\u4e4b\u540e\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u7ec4\u5c31\u4f1a\u663e\u793a\u4e0b\u6765\uff0c\u5982\u540c\u7528\u6237\u4e00\u6837\uff0c\u6700\u540e\u4e00\u4e2a\u7ec4\u5c31\u662f\u6211\u521a\u624d\u521b\u5efa\u7684\u7ec4\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n

6\uff0e\u4f7f\u7528\u547d\u4ee4\u884c\u7ec4\u7528\u6237\u540d\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u7528\u6237\u7ec4\u548c\u7ec4\u4e2d\u7684\u5176\u4ed6\u6210\u5458\u7684\u4fe1\u606f\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n

linux\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u90a3\u4e2a\u7ec4<\/p>\n

linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\u6709\u597d\u591a\u65b9\u5f0f\uff1a<\/p>\n

\u547d\u4ee4groups\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5c5e\u7ec4<\/p>\n

[root@localhostxly]#groups<\/p>\n

root<\/p>\n

groups\u7528\u6237\uff08\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff09<\/p>\n

[root@localhostxly]#groupsxly<\/p>\n

xly:xly<\/p>\n

id\u7528\u6237(\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff09<\/p>\n

[root@localhostxly]#idxly<\/p>\n

uid=500(xly)gid=500(xly)groups=500(xly)<\/p>\n

\u76f4\u63a5\u67e5\u770b\u7ec4\u6587\u4ef6\uff0ccat\/etc\/group<\/p>\n

[root@localhostxly]#cat\/etc\/group<\/p>\n

root:x:0:<\/p>\n

bin:x:1:bin,daemon<\/p>\n

daemon:x:2:bin,daemon<\/p>\n

sys:x:3:bin,adm<\/p>\n

adm:x:4:adm,daemon<\/p>\n

linux \u67e5\u770b\u7528\u6237\u7ec4_linux \u67e5\u770broot\u7ec4\u7528\u6237_linux\u67e5\u770bftp\u7528\u6237<\/p>\n

tty:x:5:<\/p>\n

disk:x:6:<\/p>\n

lp:x:7:daemon<\/p>\n

mem:x:8:<\/p>\n

kmem:x:9:<\/p>\n

xly:x:500:<\/p>\n

\u547d\u4ee4\uff1acat\/etc\/group|grep\u7ec4\u540d\uff0c\u7528\u4e8e\u67e5\u627e\u67d0\u4e2a\u7528\u6237\u7ec4<\/p>\n

linux\u4e0b\u600e\u6837\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u90a3\u4e2a\u7ec4\uff1f<\/p>\n

\"\u5728Linux\u4e0b\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u90a3\u4e2a\u7ec4\u6709\u597d\u591a\u79cd\u65b9\u5f0f\uff0c\u4e0b\u8fb9\u4ecb\u7ecd\u5e38\u7528\u7684\u65b9\u5f0f\uff1a<\/p>\n

1.\u4f7f\u7528groups\u547d\u4ee4linux c\uff0c\u540e\u4e0d\u52a0\u7528\u6237\u663e\u793a\u81ea\u5df1\u5c5e\u4e8e\u90a3\u4e2a\u7ec4\uff0c\u5018\u82e5\u540e\u63a5\u7528\u6237\u540d\uff0c\u5219\u663e\u793a\u8fd9\u4e2a\u7528\u6237\u3002<\/p>\n

linux\u67e5\u770bftp\u7528\u6237_linux \u67e5\u770b\u7528\u6237\u7ec4_linux \u67e5\u770broot\u7ec4\u7528\u6237<\/p>\n

[root@localhost\u684c\u9762]#groups<\/p>\n

root<\/p>\n

[root@localhost\u684c\u9762]#groupsmarkzhy<\/p>\n

markzhy:markzhy<\/p>\n

2.\u4f7f\u7528id\u547d\u4ee4\uff0c\u7528\u6cd5\u540cgroups\u547d\u4ee4<\/p>\n

[root@localhost\u684c\u9762]#idmarkzhy<\/p>\n

uid=1000(markzhy)gid=1000(markzhy)\u7ec4=1000(markzhy)<\/p>\n

3.\u76f4\u63a5\u67e5\u770b\/etc\/passwd\u6587\u4ef6<\/p>\n

\u63a8\u8350\u4f60\u53bb\u77a7\u77a7\u300aLinux\u5c31\u8be5\u5982\u6b64\u5b66\u300b\u8fd9\u672c\u4e66\uff0c\u7279\u522b\u9002\u5b9c\u521d\u5b66\u8005\u5b66\u4e60Linux\u3002\"<\/p>\n

\u67e5\u770bLinux\u67d0\u7528\u6237\u5c5e\u4e8e\u90a3\u4e2a\u7ec4<\/p>\n

linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\u6709\u597d\u591a\u65b9\u5f0f\uff1a1.\u547d\u4ee4groups\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5c5e\u7ec42.groups\u7528\u6237\uff08\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff093.id\u7528\u6237(\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\uff094.\u76f4\u63a5\u67e5\u770b\u7ec4\u6587\u4ef6\uff0cmore\/etc\/group\u7ec4\u7528\u6237<\/p>\n

linux\u4e0b\u600e\u6837\u67e5\u770b\u7ec4\u7684\u4ecb\u7ecd\u5c31\u804a\u5230\u8fd9\u513f\u5427\uff0c\u8c22\u8c22\u4f60\u82b1\u65f6\u95f4\u9605\u8bfb\u672c\u7ad9\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8e\u600e\u4e48\u67e5\u770blinux\u7528\u6237\u7ec4\u3001linux\u4e0b\u600e\u6837\u67e5\u770b\u7ec4\u7684\u4fe1\u606f\u522b\u5fd8\u4e86\u5728\u672c\u7ad9\u8fdb\u884c\u67e5\u627e\u5594\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u600e\u4e48\u67e5\u770b\u7528\u6237\u7ec4\u548c\u7528\u6237linux\u600e\u4e48\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u54ea\u4e9b\u7ec4linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\u6709\u5f88\u591a\u65b9\u6cd5\uff1a\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5c5e\u7ec4Linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7684\u7ec4\u7684\u547d\u4ee4\uff1fLinux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7684\u7ec4\u7684\u547d\u4ee4\u7684\u65b9\u6cd5\u30026\uff0e\u4f7f\u7528\u547d\u4ee4\u884c\u7ec4\u7528\u6237\u540d\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u7528\u6237\u7ec4\u548c\u7ec4\u4e2d\u7684\u5176\u4ed6\u6210\u5458\u7684\u4fe1\u606f\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u54ea\u4e2a\u7ec4linux\u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4\u6709\u5f88\u591a\u65b9\u6cd5\uff1a\u547d\u4ee4groups\u67e5\u770b\u5f53\u524d\u7528\u6237\u6240\u5c5e\u7ec4linux\u4e0b\u5982\u4f55\u67e5\u770b\u7528\u6237\u5c5e\u4e8e\u54ea\u4e2a\u7ec4\uff1f\u67e5\u770bLinux\u67d0\u7528\u6237\u5c5e\u4e8e\u54ea\u4e2a\u7ec4<\/p>\n","protected":false},"author":1,"featured_media":275352,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-275351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/275351","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=275351"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/275351\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/275352"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=275351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=275351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=275351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}