linux \u67e5\u770b\u7528\u6237\u7ec4<\/strong>\uff0c\u76f4\u63a5\u6309enter\u952e\uff0c\u5982\u53f3\u56fe\u6240\u793a\u3002<\/p>\n3\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
<\/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
<\/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}]}}