{"id":120881,"date":"2026-11-01T16:49:18","date_gmt":"2026-11-01T08:49:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120881.html"},"modified":"2026-11-01T16:49:18","modified_gmt":"2026-11-01T08:49:18","slug":"%e5%ae%9e%e9%aa%8c%ef%bc%9alinux%e7%94%a8%e6%88%b7%e5%92%8c%e6%9d%83%e9%99%90%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120881.html","title":{"rendered":"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406"},"content":{"rendered":"<h3 style=\"margin-left:0px;margin-right:0px\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u4e00\u3001\u77e5\u8bc6\u70b9\u603b\u7ed3<\/span><\/span><\/h3>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.1 <\/span><span style=\"color:#1a5c9e\">\u7528\u6237\u8d26\u6237\u7ba1\u7406\u57fa\u7840<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">Linux\u662f\u4e00\u4e2a\u591a\u7528\u6237\u591a\u4efb\u52a1\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u552f\u4e00\u7684\u7528\u6237\u540d\u548c\u7528\u6237\u6807\u8bc6\u7b26&#xff08;UID&#xff09;\u3002\u7528\u6237\u7ba1\u7406\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\u6700\u57fa\u672c\u7684\u5de5\u4f5c\u4e4b\u4e00\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5e38\u7528\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">useradd [\u9009\u9879] \u7528\u6237\u540d<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4e3b\u8981\u53c2\u6570\u8bf4\u660e&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">-m&#xff1a;\u81ea\u52a8\u521b\u5efa\u7528\u6237\u4e3b\u76ee\u5f55&#xff08;\/home\/\u7528\u6237\u540d&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">-s&#xff1a;\u6307\u5b9a\u7528\u6237\u767b\u5f55Shell&#xff08;\u5982\/bin\/bash&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">-G&#xff1a;\u5c06\u7528\u6237\u6dfb\u52a0\u5230\u9644\u52a0\u7ec4&#xff08;\u9017\u53f7\u5206\u9694\u591a\u4e2a\u7ec4&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">-d&#xff1a;\u6307\u5b9a\u7528\u6237\u4e3b\u76ee\u5f55\u8def\u5f84<\/p>\n<p style=\"margin-left:0;margin-right:0\">-p&#xff1a;\u76f4\u63a5\u8bbe\u7f6e\u7528\u6237\u5bc6\u7801&#xff08;\u4e0d\u63a8\u8350&#xff0c;\u4e0d\u5b89\u5168&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u793a\u4f8b&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo useradd -m -s \/bin\/bash -G jsj24 jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4e0a\u8ff0\u547d\u4ee4\u521b\u5efa\u7528\u6237jsj0217&#xff0c;\u81ea\u52a8\u521b\u5efa\u5bb6\u76ee\u5f55&#xff0c;\u6307\u5b9abash\u4e3a\u767b\u5f55Shell&#xff0c;\u5e76\u52a0\u5165jsj24\u9644\u52a0\u7ec4\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.2 <\/span><span style=\"color:#1a5c9e\">\u7528\u6237\u7ec4\u7ba1\u7406<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">Linux\u7528\u6237\u7ec4\u7528\u4e8e\u6279\u91cf\u7ba1\u7406\u7528\u6237\u6743\u9650\u3002\u6bcf\u4e2a\u7528\u6237\u6709\u4e00\u4e2a\u4e3b\u7ec4&#xff08;GID&#xff09;\u548c\u591a\u4e2a\u9644\u52a0\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5e38\u7528\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">groupadd [\u9009\u9879] \u7ec4\u540d<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">groups \u7528\u6237\u540d\u00a0\u00a0\u00a0 # \u67e5\u770b\u7528\u6237\u6240\u5c5e\u7ec4<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">groupmod [\u9009\u9879] \u7ec4\u540d\u00a0\u00a0\u00a0 # \u4fee\u6539\u7ec4\u4fe1\u606f<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">groupdel \u7ec4\u540d\u00a0\u00a0\u00a0 # \u5220\u9664\u7ec4<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u521b\u5efa\u7ec4\u540e&#xff0c;\u53ef\u901a\u8fc7useradd\u7684-G\u53c2\u6570\u6216\u5c06\u7528\u6237\u52a0\u5165\u7ec4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo groupadd jsj24<br \/>\nsudo usermod -aG jsj24 \u7528\u6237\u540d<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.3 <\/span><span style=\"color:#1a5c9e\">\u5bc6\u7801\u7ba1\u7406\u4e0e\u9501\u5b9a<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u7528\u6237\u5bc6\u7801\u7ba1\u7406\u662f\u7528\u6237\u7ba1\u7406\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002Linux\u4f7f\u7528shadow\u673a\u5236\u5b58\u50a8\u52a0\u5bc6\u5bc6\u7801\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5e38\u7528\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">passwd [\u7528\u6237\u540d]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u4fee\u6539\u5bc6\u7801&#xff08;root\u53ef\u6539\u4efb\u610f\u7528\u6237&#xff0c;\u666e\u901a\u7528\u6237\u53ea\u80fd\u6539\u81ea\u5df1\u7684&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">passwd -l \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u9501\u5b9a\u7528\u6237\u5bc6\u7801&#xff08;\u7981\u6b62\u767b\u5f55&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">passwd -u \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u89e3\u9501\u7528\u6237\u5bc6\u7801<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">passwd -S \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u67e5\u770b\u7528\u6237\u5bc6\u7801\u72b6\u6001<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">passwd -e \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u5f3a\u5236\u7528\u6237\u4e0b\u6b21\u767b\u5f55\u65f6\u4fee\u6539\u5bc6\u7801<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">passwd -S\u67e5\u770b\u72b6\u6001\u65f6\u8f93\u51fa\u683c\u5f0f&#xff1a;\u7528\u6237\u540d \u72b6\u6001 \u6700\u8fd1\u4fee\u6539\u65e5\u671f \u6700\u5c0f\u95f4\u9694 \u6700\u5927\u95f4\u9694 \u8b66\u544a\u5929\u6570 \u5bbd\u9650\u5929\u6570<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u72b6\u6001\u6807\u8bc6&#xff1a;L&#061;\u9501\u5b9a&#xff0c;P&#061;\u6709\u5bc6\u7801&#xff0c;NP&#061;\u65e0\u5bc6\u7801<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.4 <\/span><span style=\"color:#1a5c9e\">\u6587\u4ef6\u6743\u9650\u57fa\u7840&#xff08;<\/span><span style=\"color:#1a5c9e\">rwx<\/span><span style=\"color:#1a5c9e\">&#xff09;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">Linux\u6587\u4ef6\u6743\u9650\u662f\u5b89\u5168\u6a21\u578b\u7684\u6838\u5fc3\u3002\u6bcf\u4e2a\u6587\u4ef6\u6709\u4e09\u7c7b\u6743\u9650&#xff0c;\u5206\u522b\u5bf9\u5e94\u4e09\u7c7b\u7528\u6237&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6743\u9650\u7c7b\u578b&#xff1a;r&#xff08;\u8bfbread&#061;4&#xff09;\u3001w&#xff08;\u5199write&#061;2&#xff09;\u3001x&#xff08;\u6267\u884cexecute&#061;1&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7528\u6237\u7c7b\u522b&#xff1a;u&#xff08;\u6587\u4ef6\u5c5e\u4e3buser&#xff09;\u3001g&#xff08;\u6240\u5c5e\u7ec4group&#xff09;\u3001o&#xff08;\u5176\u4ed6\u7528\u6237others&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6743\u9650\u7ec4\u5408\u793a\u4f8b&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">rwxr-xr&#8211;\u00a0 &#061;&gt;\u00a0 754<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">rw-r&#8211;r&#8211;\u00a0 &#061;&gt;\u00a0 644\u00a0 (\u666e\u901a\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650)<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">rwxr-xr-x\u00a0 &#061;&gt;\u00a0 755\u00a0 (\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650\/\u53ef\u6267\u884c\u6587\u4ef6)<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u901a\u8fc7ls -l\u547d\u4ee4\u53ef\u67e5\u770b\u6587\u4ef6\u6743\u9650&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">ls -l \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u67e5\u770b\u6587\u4ef6\u8be6\u7ec6\u4fe1\u606f&#xff08;\u542b\u6743\u9650&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">ls -ld \u76ee\u5f55\u540d\u00a0\u00a0 # \u67e5\u770b\u76ee\u5f55\u672c\u8eab\u7684\u4fe1\u606f<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.5 chmod<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4&#xff08;\u4fee\u6539\u6743\u9650&#xff09;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">chmod\u547d\u4ee4\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u6743\u9650&#xff0c;\u652f\u6301\u6570\u5b57\u6cd5\u548c\u7b26\u53f7\u6cd5\u4e24\u79cd\u65b9\u5f0f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6570\u5b57\u6cd5&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod 755 \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u5c5e\u4e3brwx(7)&#xff0c;\u7ec4r-x(5)&#xff0c;\u5176\u4ed6r&#8211;(5)<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod 644 \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u5c5e\u4e3brw-(6)&#xff0c;\u7ec4r&#8211;(4)&#xff0c;\u5176\u4ed6r&#8211;(4)<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b26\u53f7\u6cd5&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod u&#043;x \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u7ed9\u5c5e\u4e3b\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod g-w \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u53bb\u6389\u7ec4\u7684\u5199\u6743\u9650<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod o&#061;r \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u8bbe\u7f6e\u5176\u4ed6\u7528\u6237\u6743\u9650\u4e3a\u53ea\u8bfb<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod a&#043;x \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u7ed9\u6240\u6709\u7528\u6237\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b26\u53f7\u8bf4\u660e&#xff1a;u&#061;\u5c5e\u4e3b&#xff0c;g&#061;\u7ec4&#xff0c;o&#061;\u5176\u4ed6&#xff0c;a&#061;\u6240\u6709&#xff0c;&#043;&#061;\u6dfb\u52a0&#xff0c;-&#061;\u53bb\u9664&#xff0c;&#061;\u8bbe\u7f6e<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.6 chown<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4&#xff08;\u4fee\u6539\u5c5e\u4e3b\u5c5e\u7ec4&#xff09;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">chown\u547d\u4ee4\u7528\u4e8e\u4fee\u6539\u6587\u4ef6\u7684\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5e38\u7528\u683c\u5f0f&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chown \u65b0\u5c5e\u4e3b \u6587\u4ef6\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u4fee\u6539\u5c5e\u4e3b<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chown \u65b0\u5c5e\u4e3b:\u65b0\u5c5e\u7ec4 \u6587\u4ef6\u540d\u00a0\u00a0\u00a0 # \u540c\u65f6\u4fee\u6539\u5c5e\u4e3b\u548c\u5c5e\u7ec4<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chown :\u65b0\u5c5e\u7ec4 \u6587\u4ef6\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u4ec5\u4fee\u6539\u5c5e\u7ec4<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chown -R \u5c5e\u4e3b:\u5c5e\u7ec4 \u76ee\u5f55\u00a0\u00a0\u00a0\u00a0\u00a0 # \u9012\u5f52\u4fee\u6539\u76ee\u5f55\u53ca\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6ce8\u610f&#xff1a;\u4fee\u6539\u5c5e\u4e3b\u9700\u8981root\u6743\u9650&#xff08;\u4f7f\u7528sudo&#xff09;\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.7 umask<\/span><span style=\"color:#1a5c9e\">\u9ed8\u8ba4\u6743\u9650\u63a9\u7801<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">umask\u5b9a\u4e49\u4e86\u7528\u6237\u521b\u5efa\u6587\u4ef6\/\u76ee\u5f55\u65f6\u7684\u9ed8\u8ba4\u6743\u9650\u63a9\u7801\u3002\u7cfb\u7edf\u4ece\u6700\u5927\u6743\u9650\u4e2d\u51cf\u53bbumask\u503c\u5f97\u5230\u5b9e\u9645\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u8ba1\u7b97\u89c4\u5219&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650 &#061; 666 &#8211; umask&#xff08;\u6587\u4ef6\u65e0\u6267\u884c\u6743\u9650&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650 &#061; 777 &#8211; umask&#xff08;\u76ee\u5f55\u6709\u6267\u884c\u6743\u9650&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5e38\u89c1umask\u503c&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask 0022\u00a0 &#061;&gt;\u00a0 \u6587\u4ef6644(rw-r&#8211;r&#8211;)&#xff0c;\u76ee\u5f55755(rwxr-xr-x)\u00a0 [\u6700\u5e38\u89c1]<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask 0027\u00a0 &#061;&gt;\u00a0 \u6587\u4ef6640(rw-r&#8212;&#8211;)&#xff0c;\u76ee\u5f55750(rwxr-x&#8212;)\u00a0 [\u66f4\u4e25\u683c]<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask 0077\u00a0 &#061;&gt;\u00a0 \u6587\u4ef6600(rw&#8212;&#8212;-)&#xff0c;\u76ee\u5f55700(rwx&#8212;&#8212;)\u00a0 [\u6700\u4e25\u683c]<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u67e5\u770b\u548c\u8bbe\u7f6eumask&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u663e\u793a\u516b\u8fdb\u5236\u503c<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask -S\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u663e\u793a\u7b26\u53f7\u5f62\u5f0f<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask 0027\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u4e34\u65f6\u4fee\u6539&#xff08;\u4ec5\u5f53\u524d\u4f1a\u8bdd\u6709\u6548&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6c38\u4e45\u4fee\u6539&#xff1a;\u5c06umask\u503c\u5199\u5165~\/.bashrc\u6587\u4ef6&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">echo &#034;umask 0027&#034; &gt;&gt; ~\/.bashrc<br \/>\nsource ~\/.bashrc<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">1.8 su<\/span><span style=\"color:#1a5c9e\">\u4e0e<\/span><span style=\"color:#1a5c9e\">sudo<\/span><span style=\"color:#1a5c9e\">\u5207\u6362\u7528\u6237<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">Linux\u4e2d\u5207\u6362\u7528\u6237\u8eab\u4efd\u6709\u4e24\u79cd\u4e3b\u8981\u65b9\u5f0f&#xff1a;su\u548csudo\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">su\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">su \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u5207\u6362\u5230\u6307\u5b9a\u7528\u6237&#xff08;\u9700\u8981\u76ee\u6807\u7528\u6237\u5bc6\u7801&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">su &#8211; \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u5207\u6362\u5e76\u52a0\u8f7d\u76ee\u6807\u7528\u6237\u7684\u73af\u5883\u53d8\u91cf<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">su\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u5207\u6362\u5230root\u7528\u6237<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo \u547d\u4ee4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u4ee5root\u6743\u9650\u6267\u884c\u547d\u4ee4&#xff08;\u9700\u8981\u5f53\u524d\u7528\u6237\u5bc6\u7801&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u533a\u522b&#xff1a;su\u9700\u8981\u76ee\u6807\u7528\u6237\u7684\u5bc6\u7801&#xff0c;\u5207\u6362\u540e\u83b7\u5f97\u76ee\u6807\u7528\u6237\u7684\u5168\u90e8\u6743\u9650&#xff1b;sudo\u53ea\u9700\u8981\u5f53\u524d\u7528\u6237\u5bc6\u7801&#xff0c;\u4e34\u65f6\u63d0\u6743\u6267\u884c\u5355\u6761\u547d\u4ee4&#xff0c;\u66f4\u52a0\u5b89\u5168\u53ef\u63a7\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5c06\u666e\u901a\u7528\u6237\u52a0\u5165sudo\u7ec4\u53ef\u83b7\u5f97sudo\u6743\u9650&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo usermod -aG sudo \u7528\u6237\u540d<\/span><\/span><\/p>\n<h2 style=\"margin-left:0;margin-right:0\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u4e8c\u3001\u77e5\u8bc6\u70b9\u5bf9\u5e94\u4f8b\u9898<\/span><\/span><\/h2>\n<p style=\"margin-left:0;margin-right:0\">\u4ee5\u4e0b\u4f8b\u9898\u56f4\u7ed5\u672c\u6587\u77e5\u8bc6\u70b9\u8bbe\u8ba1&#xff0c;\u6db5\u76d6\u7528\u6237\u7ba1\u7406\u3001\u6743\u9650\u7ba1\u7406\u3001\u4fe1\u53f7\u91cf\u7b49\u6838\u5fc3\u8003\u70b9&#xff0c;\u6bcf\u9898\u5305\u542b\u9898\u76ee\u3001\u9009\u9879\u3001\u7b54\u6848\u548c\u8be6\u7ec6\u89e3\u6790\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">1<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u7528\u6237\u521b\u5efa\u547d\u4ee4\u53c2\u6570<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u5728Linux\u7cfb\u7edf\u4e2d&#xff0c;\u4f7f\u7528useradd\u547d\u4ee4\u521b\u5efa\u65b0\u7528\u6237\u65f6&#xff0c;\u4ee5\u4e0b\u54ea\u4e2a\u53c2\u6570\u53ef\u4ee5\u81ea\u52a8\u521b\u5efa\u7528\u6237\u7684\u5bb6\u76ee\u5f55&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. -g\u00a0\u00a0\u00a0 B. -m\u00a0\u00a0\u00a0 C. -d\u00a0\u00a0\u00a0 D. -s<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">B<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;-m\u53c2\u6570\u8868\u793a&#8211;create-home&#xff0c;\u81ea\u52a8\u4e3a\u7528\u6237\u521b\u5efa\u5bb6\u76ee\u5f55&#xff08;\u9ed8\u8ba4\u5728\/home\/\u7528\u6237\u540d\u4e0b&#xff09;\u3002-g\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u7528\u6237\u7684\u4e3b\u7ec4&#xff0c;-d\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u5bb6\u76ee\u5f55\u8def\u5f84&#xff08;\u4f46\u4e0d\u81ea\u52a8\u521b\u5efa&#xff09;&#xff0c;-s\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u7528\u6237\u7684\u767b\u5f55Shell\u3002\u5982\u679c\u4e0d\u52a0-m\u53c2\u6570&#xff0c;useradd\u9ed8\u8ba4\u4e0d\u4f1a\u521b\u5efa\u5bb6\u76ee\u5f55&#xff0c;\u7528\u6237\u767b\u5f55\u540e\u4f1a\u8fdb\u5165\u6839\u76ee\u5f55&#xff0c;\u4e14\u65e0\u6cd5\u52a0\u8f7d.bashrc\u7b49\u914d\u7f6e\u6587\u4ef6&#xff0c;\u9020\u6210\u4f7f\u7528\u4e0d\u4fbf\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">2<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">chmod<\/span><span style=\"color:#1a5c9e\">\u6743\u9650\u6570\u5b57\u8ba1\u7b97<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u67d0\u6587\u4ef6\u6743\u9650\u4e3arw-r&#8211;r&#8211;&#xff0c;\u5176\u5bf9\u5e94\u7684\u516b\u8fdb\u5236\u6570\u5b57\u8868\u793a\u662f\u591a\u5c11&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. 644\u00a0\u00a0\u00a0 B. 755\u00a0\u00a0\u00a0 C. 655\u00a0\u00a0\u00a0 D. 744<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">A<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;\u6743\u9650rw-r&#8211;r&#8211;\u62c6\u5206\u4e3a\u4e09\u7ec4&#xff1a;\u5c5e\u4e3brw-&#xff08;read&#043;write&#061;4&#043;2&#043;0&#061;6&#xff09;&#xff0c;\u7ec4r&#8211;&#xff08;read&#061;4&#043;0&#043;0&#061;4&#xff09;&#xff0c;\u5176\u4ed6r&#8211;&#xff08;read&#061;4&#043;0&#043;0&#061;4&#xff09;&#xff0c;\u7ec4\u5408\u8d77\u6765\u5c31\u662f644\u3002755\u5bf9\u5e94rwxr-xr-x&#xff08;\u5c5e\u4e3b\u6709\u6267\u884c\u6743\u9650&#xff09;&#xff0c;655\u5bf9\u5e94rw-r-xr-x&#xff08;\u4e0d\u5e38\u89c1&#xff09;&#xff0c;744\u5bf9\u5e94rwxr&#8211;r&#8211;&#xff08;\u5c5e\u4e3b\u6709\u6267\u884c\u6743\u9650&#xff09;\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">3<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">umask<\/span><span style=\"color:#1a5c9e\">\u4e0e\u9ed8\u8ba4\u6743\u9650<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u67d0\u7528\u6237\u7684umask\u503c\u4e3a0027&#xff0c;\u5219\u8be5\u7528\u6237\u65b0\u5efa\u7684\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650\u662f\u591a\u5c11&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. 644\u00a0\u00a0\u00a0 B. 640\u00a0\u00a0\u00a0 C. 755\u00a0\u00a0\u00a0 D. 750<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">B<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;umask\u7684\u6743\u9650\u8ba1\u7b97\u91c7\u7528\u6309\u4f4d\u903b\u8f91\u8fd0\u7b97&#xff0c;\u800c\u975e\u7b80\u5355\u7b97\u672f\u51cf\u6cd5\u3002\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650 &#061; 666 AND (NOT umask)\u3002NOT 027&#xff08;\u6309\u4f4d\u53d6\u53cd&#xff0c;\u53ea\u53d6\u4f4e9\u4f4d&#xff09;&#061; 750&#xff0c;666 AND 750 &#061; 640\u3002\u56e0\u6b64umask&#061;0027\u65f6&#xff0c;\u65b0\u5efa\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650\u4e3a640&#xff08;rw-r&#8212;&#8211;&#xff09;&#xff0c;\u5176\u4ed6\u7528\u6237\u4e0d\u53ef\u8bfb\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">4<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">chown<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4\u7528\u6cd5<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u8981\u5c06\u6587\u4ef6test.txt\u7684\u5c5e\u4e3b\u6539\u4e3auser1&#xff0c;\u5c5e\u7ec4\u6539\u4e3adevgroup&#xff0c;\u4ee5\u4e0b\u54ea\u4e2a\u547d\u4ee4\u662f\u6b63\u786e\u7684&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. chown user1:devgroup test.txt\u00a0\u00a0\u00a0 B. chown devgroup:user1 test.txt<br \/>\nC. chown user1.devgroup test.txt\u00a0\u00a0\u00a0\u00a0 D. chgrp user1 test.txt<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">A<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;chown\u547d\u4ee4\u4fee\u6539\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u7684\u683c\u5f0f\u4e3achown \u5c5e\u4e3b:\u5c5e\u7ec4 \u6587\u4ef6\u540d&#xff0c;\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u4e4b\u95f4\u7528\u5192\u53f7:\u5206\u9694\u3002\u9009\u9879B\u628a\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u4f4d\u7f6e\u5199\u53cd\u4e86&#xff1b;\u9009\u9879C\u7528\u4e86\u70b9\u53f7\u5206\u9694&#xff0c;\u8fd9\u662f\u65e7\u5f0f\u5199\u6cd5&#xff08;chown user1.devgroup&#xff09;&#xff0c;\u867d\u7136\u67d0\u4e9b\u7cfb\u7edf\u4e5f\u652f\u6301&#xff0c;\u4f46\u6807\u51c6\u5199\u6cd5\u662f\u7528\u5192\u53f7&#xff1b;\u9009\u9879D\u7684chgrp\u547d\u4ee4\u53ea\u80fd\u4fee\u6539\u5c5e\u7ec4&#xff0c;\u4e0d\u80fd\u540c\u65f6\u4fee\u6539\u5c5e\u4e3b\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">5<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">passwd<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4\u9501\u5b9a\u7528\u6237<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u7ba1\u7406\u5458\u9700\u8981\u9501\u5b9a\u7528\u6237testuser\u7684\u5bc6\u7801&#xff0c;\u4f7f\u5176\u65e0\u6cd5\u767b\u5f55&#xff0c;\u5e94\u4f7f\u7528\u4ee5\u4e0b\u54ea\u4e2a\u547d\u4ee4&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. passwd -d testuser\u00a0\u00a0\u00a0 B. passwd -l testuser\u00a0\u00a0\u00a0 C. passwd -u testuser\u00a0\u00a0\u00a0 D. passwd -k testuser<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">B<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;passwd -l&#xff08;lock&#xff09;\u547d\u4ee4\u4f1a\u9501\u5b9a\u7528\u6237\u5bc6\u7801&#xff0c;\u5728\/etc\/shadow\u6587\u4ef6\u4e2d\u8be5\u7528\u6237\u7684\u5bc6\u7801\u5b57\u6bb5\u524d\u6dfb\u52a0!\u53f7&#xff0c;\u4f7f\u5176\u65e0\u6cd5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u767b\u5f55\u3002passwd -d&#xff08;delete&#xff09;\u4f1a\u5220\u9664\u7528\u6237\u5bc6\u7801&#xff08;\u4f7f\u5176\u65e0\u5bc6\u7801&#xff0c;\u53cd\u800c\u66f4\u5371\u9669&#xff09;&#xff1b;passwd -u&#xff08;unlock&#xff09;\u662f\u89e3\u9501\u64cd\u4f5c&#xff0c;\u4e0e\u9501\u5b9a\u76f8\u53cd&#xff1b;passwd -k&#xff08;kill&#xff09;\u4f1a\u5220\u9664\u7528\u6237\u7684\u8fc7\u671f\u5bc6\u7801\u4fe1\u606f&#xff0c;\u5f3a\u5236\u7528\u6237\u4e0b\u6b21\u767b\u5f55\u65f6\u4fee\u6539\u5bc6\u7801\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u4f8b\u9898<\/span><span style=\"color:#1a5c9e\">6<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4fe1\u53f7\u91cf\u4e0e\u4e92\u65a5&#xff08;\u64cd\u4f5c\u7cfb\u7edf\u7efc\u5408&#xff09;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u5982\u679c\u67093\u4e2a\u8fdb\u7a0b\u5171\u4eab\u540c\u4e00\u4e92\u65a5\u6bb5&#xff0c;\u6bcf\u6b21\u6700\u591a\u5141\u8bb82\u4e2a\u8fdb\u7a0b\u8fdb\u5165\u8be5\u4e92\u65a5\u6bb5&#xff0c;\u5219\u4fe1\u53f7\u91cf\u7684\u521d\u503c\u5e94\u8bbe\u7f6e\u4e3a&#xff08;&#xff09;&#xff0c;\u5f53\u67093\u4e2a\u8fdb\u7a0b\u90fd\u5c1d\u8bd5\u8fdb\u5165\u65f6&#xff0c;\u4fe1\u53f7\u91cf\u7684\u503c\u4e3a&#xff08;&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">A. 2, -1\u00a0\u00a0\u00a0 B. 3, 0\u00a0\u00a0\u00a0 C. 2, -2\u00a0\u00a0\u00a0 D. 1, -1<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><span style=\"color:#cc0000\">A<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u6790&#xff1a;\u4fe1\u53f7\u91cf\u521d\u503c\u4ee3\u8868\u53ef\u540c\u65f6\u8fdb\u5165\u7684\u8fdb\u7a0b\u6570&#xff0c;\u6700\u591a\u5141\u8bb82\u4e2a\u8fdb\u7a0b\u8fdb\u5165&#xff0c;\u6240\u4ee5\u521d\u503c\u4e3a2\u3002\u7b2c1\u4e2a\u8fdb\u7a0bP\u64cd\u4f5c&#xff1a;S&#061;2-1&#061;1&#xff0c;\u8fdb\u5165&#xff1b;\u7b2c2\u4e2a\u8fdb\u7a0bP\u64cd\u4f5c&#xff1a;S&#061;1-1&#061;0&#xff0c;\u8fdb\u5165&#xff1b;\u7b2c3\u4e2a\u8fdb\u7a0bP\u64cd\u4f5c&#xff1a;S&#061;0-1&#061;-1&#xff0c;\u88ab\u963b\u585e\u7b49\u5f85\u3002\u56e0\u6b64\u5f533\u4e2a\u8fdb\u7a0b\u90fd\u5c1d\u8bd5\u8fdb\u5165\u65f6&#xff0c;\u4fe1\u53f7\u91cf\u503c\u4e3a-1&#xff08;\u7edd\u5bf9\u503c1\u8868\u793a\u67091\u4e2a\u8fdb\u7a0b\u5728\u7b49\u5f85\u961f\u5217\u4e2d&#xff09;\u3002<\/p>\n<h2 style=\"margin-left:0;margin-right:0\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u4e09\u3001\u5b9e\u9a8c\u5185\u5bb9<\/span><\/span><\/h2>\n<p style=\"margin-left:0;margin-right:0\">\u672c\u5b9e\u9a8c\u5728Kali Linux\u73af\u5883\u4e0b\u8fdb\u884c&#xff0c;\u865a\u62df\u673a\u8f6f\u4ef6\u4e3aVMware Workstation Pro&#xff0c;\u767b\u5f55\u8d26\u53f7\u4e3azouhuixin0217&#xff08;\u59d3\u540d\u62fc\u97f3&#043;\u5b66\u53f7\u540e\u56db\u4f4d&#xff09;\u3002\u4ee5\u4e0b\u4e3a\u5b9e\u9a8c\u73af\u5883\u786e\u8ba4\u548c\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">3.0 <\/span><span style=\"color:#1a5c9e\">\u5b9e\u9a8c\u73af\u5883\u786e\u8ba4<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u6253\u5f00\u7ec8\u7aef\u540e&#xff0c;\u9996\u5148\u4f7f\u7528who\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u767b\u5f55\u7528\u6237\u4fe1\u606f&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">who<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"118\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0b8aef6.png\" width=\"511\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">1<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">who<\/span><span style=\"color:#666666\">\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u767b\u5f55\u7528\u6237\u4fe1\u606f<\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">3.1 <\/span><span style=\"color:#1a5c9e\">\u4efb\u52a1<\/span><span style=\"color:#1a5c9e\">1<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u7528\u6237\u8d26\u6237\u7ba1\u7406<\/span><\/span><\/h3>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(1)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u521b\u5efa\u7528\u6237\u7ec4\u5e76\u65b0\u5efa\u7528\u6237<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u521b\u5efa\u7528\u6237\u7ec4jsj24&#xff0c;\u7136\u540e\u65b0\u5efa\u7528\u6237jsj0217&#xff08;jsj&#043;\u5b66\u53f7\u540e4\u4f4d&#xff09;&#xff0c;\u540c\u65f6\u5c06\u5176\u52a0\u5165\u7ec4jsj24\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo groupadd jsj24<br \/>\nsudo useradd -m -s \/bin\/bash -G jsj24 jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo groupadd jsj24&#xff1a;\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u521b\u5efa\u65b0\u7528\u6237\u7ec4jsj24\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo useradd -m -s \/bin\/bash -G jsj24 jsj0217&#xff1a;\u521b\u5efa\u65b0\u7528\u6237jsj0217&#xff0c;-m\u53c2\u6570\u81ea\u52a8\u521b\u5efa\u5bb6\u76ee\u5f55&#xff0c;-s \/bin\/bash\u6307\u5b9a\u767b\u5f55Shell\u4e3abash&#xff0c;-G jsj24\u5c06\u7528\u6237\u52a0\u5165jsj24\u9644\u52a0\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">id jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9a8c\u8bc1\u547d\u4ee4&#xff1a;\u4f7f\u7528id\u547d\u4ee4\u67e5\u770b\u7528\u6237jsj0217\u7684UID\u3001GID\u53ca\u6240\u5c5e\u7ec4\u4fe1\u606f&#xff0c;\u786e\u8ba4\u7528\u6237\u521b\u5efa\u6210\u529f\u4e14\u5df2\u52a0\u5165jsj24\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"275\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0ba1fa0.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">2<\/span><span style=\"color:#666666\">&#xff1a;\u521b\u5efa\u7528\u6237\u7ec4<\/span><span style=\"color:#666666\">jsj24<\/span><span style=\"color:#666666\">\u5e76\u65b0\u5efa\u7528\u6237<\/span><span style=\"color:#666666\">jsj0217<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"95\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0bcbab6.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">3<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">id<\/span><span style=\"color:#666666\">\u547d\u4ee4\u9a8c\u8bc1\u7528\u6237<\/span><span style=\"color:#666666\">jsj0217<\/span><span style=\"color:#666666\">\u7684\u7ec4\u4fe1\u606f<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(2)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u521b\u5efa\u7b2c\u4e8c\u4e2a\u7528\u6237\u5e76\u52a0\u5165\u7ec4<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u521b\u5efa\u7528\u6237jsj240217&#xff08;jsj24&#043;\u5b66\u53f7\u540e4\u4f4d&#xff09;&#xff0c;\u5e76\u8ba9\u5176\u52a0\u5165jsj24\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo useradd -m -s \/bin\/bash -G jsj24 jsj240217<br \/>\nid jsj240217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4e0e\u6b65\u9aa4(1)\u7c7b\u4f3c&#xff0c;\u521b\u5efa\u65b0\u7528\u6237jsj240217\u5e76\u52a0\u5165jsj24\u7ec4\u3002\u901a\u8fc7id\u547d\u4ee4\u9a8c\u8bc1\u7528\u6237\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"158\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0be27fe.png\" width=\"524\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">4<\/span><span style=\"color:#666666\">&#xff1a;\u521b\u5efa\u7528\u6237<\/span><span style=\"color:#666666\">jsj240217<\/span><span style=\"color:#666666\">\u5e76\u9a8c\u8bc1<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(3)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u8bbe\u7f6e\u7528\u6237\u5bc6\u7801<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u4f7f\u7528passwd\u547d\u4ee4\u4e3a\u65b0\u7528\u6237jsj0217\u8bbe\u7f6e\u767b\u5f55\u5bc6\u7801my123456\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo passwd jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo passwd jsj0217&#xff1a;\u4ee5root\u6743\u9650\u4fee\u6539\u7528\u6237jsj0217\u7684\u5bc6\u7801\u3002\u7cfb\u7edf\u4f1a\u63d0\u793a\u8f93\u5165\u65b0\u5bc6\u7801\u5e76\u786e\u8ba4\u8f93\u5165\u3002\u6ce8\u610f\u5bc6\u7801\u8f93\u5165\u65f6\u4e0d\u4f1a\u663e\u793a\u5b57\u7b26&#xff0c;\u8fd9\u662fLinux\u7684\u5b89\u5168\u673a\u5236\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"214\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c0055d.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">5<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">passwd<\/span><span style=\"color:#666666\">\u547d\u4ee4\u8bbe\u7f6e\u7528\u6237<\/span><span style=\"color:#666666\">jsj0217<\/span><span style=\"color:#666666\">\u7684\u5bc6\u7801<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(4)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u9501\u5b9a\u7528\u6237\u5bc6\u7801<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u4f7f\u7528passwd\u547d\u4ee4\u9501\u5b9a\u7528\u6237jsj0217\u7684\u5bc6\u7801&#xff0c;\u7136\u540e\u67e5\u770b\u9501\u5b9a\u72b6\u6001\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo passwd -l jsj0217<br \/>\nsudo passwd -S jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo passwd -l jsj0217&#xff1a;\u9501\u5b9a\u7528\u6237jsj0217\u7684\u5bc6\u7801&#xff0c;\u9501\u5b9a\u540e\u8be5\u7528\u6237\u5c06\u65e0\u6cd5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u767b\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo passwd -S jsj0217&#xff1a;\u67e5\u770b\u7528\u6237jsj0217\u7684\u5bc6\u7801\u72b6\u6001\u3002\u8f93\u51fa\u4e2d\u5982\u679c\u663e\u793a&#034;L&#034;&#xff08;Locked&#xff09;&#xff0c;\u8868\u793a\u5bc6\u7801\u5df2\u88ab\u9501\u5b9a\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"374\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c25022.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">6<\/span><span style=\"color:#666666\">&#xff1a;\u9501\u5b9a\u7528\u6237\u5bc6\u7801\u5e76\u67e5\u770b\u72b6\u6001&#xff08;<\/span><span style=\"color:#666666\">L<\/span><span style=\"color:#666666\">\u8868\u793a\u5df2\u9501\u5b9a&#xff09;<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(5)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u5207\u6362\u5230<\/span><span style=\"color:#1a5c9e\">tty2<\/span><span style=\"color:#1a5c9e\">\u5c1d\u8bd5\u767b\u5f55<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u5207\u6362\u5230\u7b2c\u4e8c\u4e2a\u865a\u62df\u7ec8\u7aef&#xff08;tty2&#xff09;&#xff0c;\u5c1d\u8bd5\u4ee5jsj0217\u7528\u6237\u767b\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">Ctrl &#043; Alt &#043; F2\u00a0\u00a0\u00a0 # \u5207\u6362\u5230tty2\u7ec8\u7aef<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5728\u767b\u5f55\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u7528\u6237\u540djsj0217\u548c\u5bc6\u7801my123456\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9884\u671f\u7ed3\u679c&#xff1a;\u767b\u5f55\u5931\u8d25\u3002\u56e0\u4e3a\u5bc6\u7801\u5df2\u88ab\u9501\u5b9a&#xff08;\u6b65\u9aa44&#xff09;&#xff0c;\u7cfb\u7edf\u4f1a\u63d0\u793a\u8ba4\u8bc1\u5931\u8d25\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"298\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c563e1.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">7<\/span><span style=\"color:#666666\">&#xff1a;\u5207\u6362\u5230<\/span><span style=\"color:#666666\">tty2<\/span><span style=\"color:#666666\">\u7ec8\u7aef\u5e76\u8f93\u5165\u7528\u6237\u540d\u767b\u5f55<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"275\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c6ef14.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">8<\/span><span style=\"color:#666666\">&#xff1a;\u5bc6\u7801\u9501\u5b9a\u540e\u767b\u5f55\u5931\u8d25\u63d0\u793a<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(6)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u89e3\u9501\u5bc6\u7801\u5e76\u91cd\u65b0\u767b\u5f55<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u5207\u56de\u56fe\u5f62\u754c\u9762&#xff0c;\u4f7f\u7528\u7ba1\u7406\u5458\u8d26\u6237\u89e3\u9501\u7528\u6237\u5bc6\u7801&#xff0c;\u7136\u540e\u518d\u5728tty2\u4e2d\u5c1d\u8bd5\u767b\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">Ctrl &#043; Alt &#043; F7\u00a0\u00a0\u00a0 # \u5207\u56de\u56fe\u5f62\u754c\u9762&#xff08;\u6216F1&#xff09;<br \/>\nsudo passwd -u jsj0217\u00a0\u00a0\u00a0 # \u89e3\u9501\u7528\u6237\u5bc6\u7801<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">Ctrl &#043; Alt &#043; F7&#xff1a;\u5207\u56de\u56fe\u5f62\u754c\u9762&#xff08;Kali Linux\u4e2d\u56fe\u5f62\u754c\u9762\u901a\u5e38\u5728F7&#xff0c;\u4e5f\u53ef\u80fd\u662fF1&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo passwd -u jsj0217&#xff1a;\u89e3\u9501\u7528\u6237jsj0217\u7684\u5bc6\u7801&#xff0c;\u89e3\u9664\u9501\u5b9a\u72b6\u6001\u540e\u8be5\u7528\u6237\u53ef\u4ee5\u6b63\u5e38\u767b\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9884\u671f\u7ed3\u679c&#xff1a;\u89e3\u9501\u6210\u529f\u540e&#xff0c;\u56de\u5230tty2\u7ec8\u7aef\u4f7f\u7528jsj0217\/my123456\u767b\u5f55&#xff0c;\u5e94\u8be5\u53ef\u4ee5\u6210\u529f\u767b\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"170\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c87601.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">9<\/span><span style=\"color:#666666\">&#xff1a;\u5207\u56de\u56fe\u5f62\u754c\u9762\u5e76\u89e3\u9501\u7528\u6237\u5bc6\u7801<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"229\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0c9cbd9.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">10<\/span><span style=\"color:#666666\">&#xff1a;\u5bc6\u7801\u89e3\u9501\u6210\u529f<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(7)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u67e5\u770b\u8d26\u53f7\u4fe1\u606f<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u767b\u5f55\u6210\u529f\u540e&#xff0c;\u67e5\u770b\u5f53\u524d\u7528\u6237\u7684\u8d26\u53f7\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">id<br \/>\nwhoami<br \/>\ngrep jsj0217 \/etc\/passwd<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">id&#xff1a;\u663e\u793a\u5f53\u524d\u7528\u6237\u7684UID\u3001GID\u53ca\u6240\u5c5e\u7ec4\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">whoami&#xff1a;\u663e\u793a\u5f53\u524d\u767b\u5f55\u7528\u6237\u540d\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">grep jsj0217 \/etc\/passwd&#xff1a;\u5728\/etc\/passwd\u6587\u4ef6\u4e2d\u641c\u7d22jsj0217\u7528\u6237\u7684\u8be6\u7ec6\u914d\u7f6e\u4fe1\u606f&#xff08;\u5305\u62ec\u5bb6\u76ee\u5f55\u8def\u5f84\u3001\u767b\u5f55Shell\u7b49&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"283\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0cb26c2.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">11<\/span><span style=\"color:#666666\">&#xff1a;\u67e5\u770b\u7528\u6237\u8d26\u53f7\u4fe1\u606f&#xff08;<\/span><span style=\"color:#666666\">id\/whoami\/grep<\/span><span style=\"color:#666666\">&#xff09;<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(8)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u67e5\u770b\u7528\u6237\u7ec4\u4fe1\u606f<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u67e5\u770b\u7528\u6237jsj0217\u6240\u5c5e\u7684\u7528\u6237\u7ec4\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">groups jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">groups jsj0217&#xff1a;\u663e\u793a\u7528\u6237jsj0217\u6240\u5c5e\u7684\u6240\u6709\u7ec4&#xff0c;\u5305\u62ec\u4e3b\u7ec4\u548c\u9644\u52a0\u7ec4\u3002\u8f93\u51fa\u5e94\u663e\u793ajsj0217\u5c5e\u4e8ejsj0217\u7ec4\u548cjsj24\u7ec4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"187\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0ccabba.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">12<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">groups<\/span><span style=\"color:#666666\">\u547d\u4ee4\u67e5\u770b\u7528\u6237\u7ec4\u4fe1\u606f<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(9)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4fee\u6539\u7528\u6237\u540d<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u5c06\u7528\u6237jsj0217\u7684\u7528\u6237\u540d\u4fee\u6539\u4e3aMacs0217&#xff08;Macs&#043;\u5b66\u53f7\u540e4\u4f4d&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo usermod -l Macs0217 jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo usermod -l Macs0217 jsj0217&#xff1a;-l\u53c2\u6570\u7528\u4e8e\u4fee\u6539\u7528\u6237\u540d&#xff08;login name&#xff09;&#xff0c;\u5c06\u539f\u7528\u6237\u540djsj0217\u6539\u4e3aMacs0217\u3002\u6ce8\u610f&#xff1a;\u88ab\u4fee\u6539\u7684\u7528\u6237\u5f53\u524d\u4e0d\u80fd\u5904\u4e8e\u767b\u5f55\u72b6\u6001&#xff0c;\u5426\u5219\u4f1a\u5931\u8d25\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">id Macs0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9a8c\u8bc1&#xff1a;\u4f7f\u7528id\u547d\u4ee4\u786e\u8ba4\u7528\u6237\u540d\u5df2\u4fee\u6539\u6210\u529f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"265\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084916-6ae6fd0cde0d9.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">13<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">usermod -l<\/span><span style=\"color:#666666\">\u4fee\u6539\u7528\u6237\u540d\u4e3a<\/span><span style=\"color:#666666\">Macs0217<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(10)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4fee\u6539\u7528\u6237\u540d\u5e76\u540c\u6b65\u4fee\u6539\u4e3b\u76ee\u5f55<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u5207\u6362\u5230\u8d26\u6237zouhuixin0217&#xff0c;\u4fee\u6539\u7528\u6237jsj0217\u7684\u7528\u6237\u540d\u4e3aMacs0217&#xff0c;\u5e76\u540c\u65f6\u5c06\u5176\u7528\u6237\u4e3b\u76ee\u5f55\u4fee\u6539\u4e3a\/home\/Macs0217\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo usermod -l Macs0217 -d \/home\/Macs0217 -m jsj0217<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo usermod -l Macs0217&#xff1a;\u4fee\u6539\u7528\u6237\u540d\u4e3aMacs0217\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">-d \/home\/Macs0217&#xff1a;\u8bbe\u7f6e\u65b0\u7684\u4e3b\u76ee\u5f55\u8def\u5f84\u4e3a\/home\/Macs0217\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">-m&#xff1a;\u5c06\u539f\u4e3b\u76ee\u5f55\u7684\u5185\u5bb9\u79fb\u52a8\u5230\u65b0\u4e3b\u76ee\u5f55&#xff08;\u7b49\u4ef7\u4e8e-mv&#xff0c;\u540c\u65f6\u66f4\u65b0\/etc\/passwd\u4e2d\u7684\u8def\u5f84&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">id Macs0217<br \/>\nls -ld \/home\/Macs0217<br \/>\ngrep Macs0217 \/etc\/passwd<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9a8c\u8bc1&#xff1a;\u5206\u522b\u4f7f\u7528id\u3001ls -ld\u3001grep\u547d\u4ee4\u786e\u8ba4\u7528\u6237\u540d\u3001\u4e3b\u76ee\u5f55\u8def\u5f84\u5747\u5df2\u6b63\u786e\u4fee\u6539\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"139\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d00a71.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">14<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">usermod<\/span><span style=\"color:#666666\">\u4fee\u6539\u7528\u6237\u540d\u5e76\u540c\u6b65\u8fc1\u79fb\u4e3b\u76ee\u5f55<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"211\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d10532.png\" width=\"543\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">15<\/span><span style=\"color:#666666\">&#xff1a;\u9a8c\u8bc1\u7528\u6237\u540d\u548c\u4e3b\u76ee\u5f55\u4fee\u6539\u7ed3\u679c<\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">3.2 <\/span><span style=\"color:#1a5c9e\">\u4efb\u52a1<\/span><span style=\"color:#1a5c9e\">2<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u6587\u4ef6\u6743\u9650\u7ba1\u7406<\/span><\/span><\/h3>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(1)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u521b\u5efa\u811a\u672c\u6587\u4ef6<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u5207\u6362\u5230\u56fe\u5f62\u754c\u9762&#xff0c;\u5728\u684c\u9762\u76ee\u5f55\u4e0b\u4ee5\u5f53\u524d\u7528\u6237\u8eab\u4efd\u521b\u5efa\u811a\u672c\u6587\u4ef6pwd.sh&#xff0c;\u5e76\u5411\u5176\u4e2d\u8ffd\u52a0\u5185\u5bb9&#034;pwd&#034;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">cd \/home\/zouhuixin0217\/\u684c\u9762<br \/>\necho pwd &gt;&gt; pwd.sh<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">cd \/home\/zouhuixin0217\/\u684c\u9762&#xff1a;\u5207\u6362\u5230\u684c\u9762\u76ee\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">echo pwd &gt;&gt; pwd.sh&#xff1a;\u5c06\u5b57\u7b26\u4e32&#034;pwd&#034;\u8ffd\u52a0\u5199\u5165\u5230pwd.sh\u6587\u4ef6\u4e2d&#xff08;&gt;&gt;\u8868\u793a\u8ffd\u52a0&#xff0c;\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\u5219\u521b\u5efa&#xff09;\u3002\u6ce8\u610f\u8fd9\u91ccecho\u8f93\u51fa\u7684\u662f\u5b57\u7b26\u4e32&#034;pwd&#034;\u800c\u975e\u5f53\u524d\u76ee\u5f55\u8def\u5f84&#xff0c;\u82e5\u8981\u8f93\u51fa\u5f53\u524d\u76ee\u5f55\u5e94\u4f7f\u7528echo $(pwd) &gt;&gt; pwd.sh\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">ls -l pwd.sh<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9a8c\u8bc1&#xff1a;\u67e5\u770bpwd.sh\u6587\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f&#xff0c;\u786e\u8ba4\u6587\u4ef6\u5df2\u521b\u5efa\u6210\u529f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"214\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d1cb4b.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">16<\/span><span style=\"color:#666666\">&#xff1a;\u5728\u684c\u9762\u76ee\u5f55\u521b\u5efa<\/span><span style=\"color:#666666\">pwd.sh<\/span><span style=\"color:#666666\">\u811a\u672c\u6587\u4ef6\u5e76\u67e5\u770b<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(2)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u67e5\u770b<\/span><span style=\"color:#1a5c9e\">umask<\/span><span style=\"color:#1a5c9e\">\u9ed8\u8ba4\u6743\u9650\u63a9\u7801<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u67e5\u770b\u7cfb\u7edf\u4e2d\u65b0\u5efa\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u9ed8\u8ba4\u6743\u9650\u63a9\u7801\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask<br \/>\numask -S<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">umask&#xff1a;\u4ee5\u516b\u8fdb\u5236\u5f62\u5f0f\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u6743\u9650\u63a9\u7801\u503c&#xff08;\u901a\u5e38\u4e3a0022&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">umask -S&#xff1a;\u4ee5\u7b26\u53f7\u5f62\u5f0f\u663e\u793a\u6743\u9650\u63a9\u7801&#xff08;\u5982u&#061;rwx,g&#061;rx,o&#061;rx&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">umask\u503c\u51b3\u5b9a\u4e86\u65b0\u521b\u5efa\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650&#xff1a;\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650&#061;666-umask&#xff0c;\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650&#061;777-umask\u3002\u5f53umask&#061;0022\u65f6&#xff0c;\u65b0\u5efa\u6587\u4ef6\u6743\u9650\u4e3a644&#xff08;rw-r&#8211;r&#8211;&#xff09;&#xff0c;\u65b0\u5efa\u76ee\u5f55\u6743\u9650\u4e3a755&#xff08;rwxr-xr-x&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"138\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d330b6.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">17<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">umask<\/span><span style=\"color:#666666\">\u547d\u4ee4\u67e5\u770b\u9ed8\u8ba4\u6743\u9650\u63a9\u7801&#xff08;\u516b\u8fdb\u5236\u5f62\u5f0f&#xff09;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"147\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d43552.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">18<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">umask -S<\/span><span style=\"color:#666666\">\u67e5\u770b\u9ed8\u8ba4\u6743\u9650\u63a9\u7801&#xff08;\u7b26\u53f7\u5f62\u5f0f&#xff09;<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(3)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u65b0\u5efa\u6587\u4ef6\u548c\u76ee\u5f55\u5e76\u9a8c\u8bc1\u6743\u9650<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u65b0\u5efa\u6587\u4ef6test1\u548c\u76ee\u5f55tt2&#xff0c;\u67e5\u770b\u5b83\u4eec\u7684\u6743\u9650&#xff0c;\u9a8c\u8bc1\u662f\u5426\u4e0eumask\u8bbe\u5b9a\u7684\u9ed8\u8ba4\u6743\u9650\u76f8\u7b26\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">touch test1<br \/>\nmkdir tt2<br \/>\nls -l test1<br \/>\nls -ld tt2<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">touch test1&#xff1a;\u521b\u5efa\u7a7a\u6587\u4ef6test1\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">mkdir tt2&#xff1a;\u521b\u5efa\u76ee\u5f55tt2\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">ls -l test1&#xff1a;\u67e5\u770b\u6587\u4ef6test1\u7684\u8be6\u7ec6\u4fe1\u606f&#xff08;\u6743\u9650\u3001\u5c5e\u4e3b\u3001\u5927\u5c0f\u7b49&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">ls -ld tt2&#xff1a;\u67e5\u770b\u76ee\u5f55tt2\u672c\u8eab\u7684\u8be6\u7ec6\u4fe1\u606f&#xff08;-d\u53c2\u6570\u8868\u793a\u53ea\u770b\u76ee\u5f55\u672c\u8eab&#xff0c;\u4e0d\u770b\u76ee\u5f55\u5185\u5bb9&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9884\u671f\u7ed3\u679c&#xff1a;\u6587\u4ef6test1\u6743\u9650\u4e3arw-r&#8211;r&#8211;&#xff08;644&#xff09;&#xff0c;\u76ee\u5f55tt2\u6743\u9650\u4e3arwxr-xr-x&#xff08;755&#xff09;&#xff0c;\u4e0eumask&#061;0022\u65f6\u7684\u9ed8\u8ba4\u6743\u9650\u4e00\u81f4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"344\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d54af5.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">19<\/span><span style=\"color:#666666\">&#xff1a;\u65b0\u5efa\u6587\u4ef6<\/span><span style=\"color:#666666\">test1<\/span><span style=\"color:#666666\">\u548c\u76ee\u5f55<\/span><span style=\"color:#666666\">tt2<\/span><span style=\"color:#666666\">\u5e76\u67e5\u770b\u6743\u9650&#xff08;\u4e0e<\/span><span style=\"color:#666666\">umask<\/span><span style=\"color:#666666\">\u9ed8\u8ba4\u6743\u9650\u76f8\u7b26&#xff09;<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(4)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4fee\u6539\u6587\u4ef6\u6743\u9650<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u4fee\u6539pwd.sh\u6587\u4ef6\u7684\u6743\u9650\u4e3ar-xr&#8211;r&#8211;&#xff08;\u5373\u6570\u5b57544&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chmod 544 pwd.sh<br \/>\nls -l pwd.sh<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod 544 pwd.sh&#xff1a;\u4f7f\u7528\u6570\u5b57\u6cd5\u4fee\u6539pwd.sh\u7684\u6743\u9650\u30025&#061; r-x&#xff08;\u5c5e\u4e3b\u6709\u8bfb\u548c\u6267\u884c\u6743\u9650&#xff09;&#xff0c;4&#061; r&#8211;&#xff08;\u7ec4\u7528\u6237\u53ea\u6709\u8bfb\u6743\u9650&#xff09;&#xff0c;4&#061; r&#8211;&#xff08;\u5176\u4ed6\u7528\u6237\u53ea\u6709\u8bfb\u6743\u9650&#xff09;\u3002\u4fee\u6539\u540e\u6743\u9650\u4e3ar-xr&#8211;r&#8211;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">ls -l pwd.sh&#xff1a;\u9a8c\u8bc1\u6743\u9650\u4fee\u6539\u662f\u5426\u6210\u529f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"224\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084917-6ae6fd0d73838.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">20<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">chmod 544<\/span><span style=\"color:#666666\">\u4fee\u6539<\/span><span style=\"color:#666666\">pwd.sh<\/span><span style=\"color:#666666\">\u6743\u9650\u5e76\u9a8c\u8bc1<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(5)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u6267\u884c\u811a\u672c\u6587\u4ef6<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u6267\u884c\u5f53\u524d\u76ee\u5f55\u4e0b\u7684pwd.sh\u811a\u672c\u6587\u4ef6\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">.\/pwd.sh<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">.\/pwd.sh&#xff1a;\u6267\u884c\u5f53\u524d\u76ee\u5f55&#xff08;.\u8868\u793a\u5f53\u524d\u76ee\u5f55&#xff09;\u4e0b\u7684pwd.sh\u811a\u672c\u6587\u4ef6\u3002\u6ce8\u610f\u6267\u884c\u672c\u5730\u6587\u4ef6\u5fc5\u987b\u4f7f\u7528.\/\u524d\u7f00&#xff0c;\u4e0d\u80fd\u53ea\u5199\u6587\u4ef6\u540d&#xff0c;\u8fd9\u662fLinux\u7684\u5b89\u5168\u673a\u5236&#xff0c;\u9632\u6b62\u6267\u884c\u6076\u610f\u7a0b\u5e8f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9884\u671f\u7ed3\u679c&#xff1a;\u5982\u679c\u6743\u9650\u8bbe\u7f6e\u6b63\u786e&#xff08;\u6709\u6267\u884c\u6743\u9650x&#xff09;&#xff0c;\u811a\u672c\u4f1a\u6267\u884c\u5176\u4e2d\u7684\u547d\u4ee4\u5e76\u8f93\u51fa\u7ed3\u679c\u3002\u5982\u679c\u63d0\u793aPermission denied&#xff0c;\u9700\u8981\u68c0\u67e5\u6587\u4ef6\u6743\u9650\u548c\u76ee\u5f55\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"208\" src=\"2026-11-01byeace2m2ue.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">21<\/span><span style=\"color:#666666\">&#xff1a;\u6267\u884c<\/span><span style=\"color:#666666\">pwd.sh<\/span><span style=\"color:#666666\">\u811a\u672c\u6587\u4ef6<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(6)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4fee\u6539\u6587\u4ef6\u5c5e\u4e3b\u548c\u5c5e\u7ec4<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u4fee\u6539\u6587\u4ef6test1\u7684\u5c5e\u4e3b\u4e3aMacs0217&#xff0c;\u5c5e\u7ec4\u4e3ajsj24\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo chown Macs0217:jsj24 test1<br \/>\nls -l test1<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">sudo chown Macs0217:jsj24 test1&#xff1a;\u4ee5root\u6743\u9650\u4fee\u6539test1\u7684\u5c5e\u4e3b\u4e3aMacs0217&#xff0c;\u5c5e\u7ec4\u4e3ajsj24\u3002\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u4e4b\u95f4\u7528\u5192\u53f7:\u5206\u9694\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">ls -l test1&#xff1a;\u9a8c\u8bc1\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u4fee\u6539\u662f\u5426\u6210\u529f\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"221\" src=\"2026-11-01200kjodptp2.png\" width=\"794\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">22<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">chown<\/span><span style=\"color:#666666\">\u4fee\u6539<\/span><span style=\"color:#666666\">test1<\/span><span style=\"color:#666666\">\u7684\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u5e76\u9a8c\u8bc1<\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u6b65\u9aa4<\/span><span style=\"color:#1a5c9e\">(7)<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u7ed9\u5c5e\u4e3b\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u64cd\u4f5c\u63cf\u8ff0&#xff1a;\u4f7ftest1\u6587\u4ef6\u7684\u5c5e\u4e3b\u5177\u6709\u53ef\u6267\u884c\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">chmod u&#043;x test1<br \/>\nls -l test1<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u547d\u4ee4\u89e3\u91ca&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">chmod u&#043;x test1&#xff1a;\u4f7f\u7528\u7b26\u53f7\u6cd5\u7ed9test1\u6587\u4ef6\u7684\u5c5e\u4e3b&#xff08;user&#xff09;\u6dfb\u52a0\u6267\u884c\u6743\u9650&#xff08;&#043;x&#xff09;\u3002\u4fee\u6539\u540e\u5c5e\u4e3b\u6743\u9650\u4ecerw-\u53d8\u4e3arwx\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">ls -l test1&#xff1a;\u9a8c\u8bc1\u6743\u9650\u4fee\u6539\u7ed3\u679c\u3002\u4fee\u6539\u540etest1\u7684\u6743\u9650\u5e94\u53d8\u4e3arwxr&#8211;r&#8211;&#xff08;\u5c5e\u4e3b\u6709rwx\u6743\u9650&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"132\" src=\"2026-11-01bukem05za5z.png\" width=\"536\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#666666\">\u56fe<\/span><span style=\"color:#666666\">23<\/span><span style=\"color:#666666\">&#xff1a;\u4f7f\u7528<\/span><span style=\"color:#666666\">chmod u&#043;x<\/span><span style=\"color:#666666\">\u7ed9<\/span><span style=\"color:#666666\">test1<\/span><span style=\"color:#666666\">\u5c5e\u4e3b\u6dfb\u52a0\u6267\u884c\u6743\u9650\u5e76\u9a8c\u8bc1<\/span><\/p>\n<h2 style=\"margin-left:0;margin-right:0\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u56db\u3001\u601d\u8003\u9898\u4e0e\u7b54\u6848\u89e3\u6790<\/span><\/span><\/h2>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">4.1 <\/span><span style=\"color:#1a5c9e\">\u4efb\u52a1<\/span><span style=\"color:#1a5c9e\">1<\/span><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><\/span><\/h3>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><span style=\"color:#1a5c9e\">1<\/span><span style=\"color:#1a5c9e\">&#xff1a;\u4e3a\u4ec0\u4e48\u63a8\u8350\u4f7f\u7528<\/span><span style=\"color:#1a5c9e\"> useradd -m<\/span><span style=\"color:#1a5c9e\">&#xff1f;<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u4e3a\u4ec0\u4e48\u5728\u521b\u5efa\u7528\u6237\u65f6&#xff0c;\u63a8\u8350\u4f7f\u7528 useradd -m \u800c\u4e0d\u662f\u5355\u72ec\u4f7f\u7528 useradd&#xff1f;\u5982\u679c\u4e0d\u52a0 -m \u53c2\u6570&#xff0c;\u5728\u540e\u7eed\u4f7f\u7528\u4e2d\u4f1a\u9047\u5230\u4ec0\u4e48\u9ebb\u70e6&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">useradd\u547d\u4ee4\u4e0d\u52a0-m\u53c2\u6570\u65f6&#xff0c;\u9ed8\u8ba4\u4e0d\u4f1a\u81ea\u52a8\u521b\u5efa\u7528\u6237\u7684\u4e3b\u76ee\u5f55&#xff08;\/home\/\u7528\u6237\u540d&#xff09;\u3002\u8fd9\u4f1a\u5bfc\u81f4\u4ee5\u4e0b\u95ee\u9898&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">&#xff08;1&#xff09;\u7528\u6237\u767b\u5f55\u540e\u6ca1\u6709\u6b63\u5e38\u7684\u5bb6\u76ee\u5f55&#xff0c;\u9ed8\u8ba4\u8fdb\u5165\u6839\u76ee\u5f55\/&#xff0c;\u4f53\u9a8c\u6781\u5dee&#xff1b;<\/p>\n<p style=\"margin-left:0;margin-right:0\">&#xff08;2&#xff09;.bashrc\u3001.profile\u3001.bash_profile\u7b49Shell\u914d\u7f6e\u6587\u4ef6\u65e0\u6cd5\u52a0\u8f7d&#xff0c;\u5bfc\u81f4\u73af\u5883\u53d8\u91cf\u3001\u522b\u540d\u3001\u63d0\u793a\u7b26\u5b9a\u5236\u7b49\u90fd\u65e0\u6cd5\u751f\u6548&#xff1b;<\/p>\n<p style=\"margin-left:0;margin-right:0\">&#xff08;3&#xff09;\u67d0\u4e9b\u7a0b\u5e8f&#xff08;\u5982ssh\u3001ftp\u7b49&#xff09;\u4f9d\u8d56\u5bb6\u76ee\u5f55\u5b58\u5728\u624d\u80fd\u6b63\u5e38\u5de5\u4f5c&#xff0c;\u7f3a\u5c11\u5bb6\u76ee\u5f55\u4f1a\u5bfc\u81f4\u8fd9\u4e9b\u670d\u52a1\u62a5\u9519&#xff1b;<\/p>\n<p style=\"margin-left:0;margin-right:0\">&#xff08;4&#xff09;\u90ae\u4ef6\u7cfb\u7edf\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c&#xff08;\u9ed8\u8ba4\u90ae\u4ef6\u5b58\u50a8\u5728\/home\/\u7528\u6237\u540d\/Maildir\u6216\/var\/mail\/\u7528\u6237\u540d&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u56e0\u6b64&#xff0c;\u521b\u5efa\u666e\u901a\u53ef\u767b\u5f55\u7528\u6237\u65f6&#xff0c;\u59cb\u7ec8\u63a8\u8350\u4f7f\u7528&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo useradd -m -s \/bin\/bash \u7528\u6237\u540d<\/span><\/span><\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><span style=\"color:#1a5c9e\">2<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">sudo<\/span><span style=\"color:#1a5c9e\">\u7ec4\u4e0e<\/span><span style=\"color:#1a5c9e\">UID&#061;0<\/span><span style=\"color:#1a5c9e\">\u7684\u533a\u522b<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u5728Kali Linux\u4e2d&#xff0c;\u5c06\u666e\u901a\u7528\u6237\u52a0\u5165sudo\u7ec4\u4e0e\u76f4\u63a5\u5c06\u5176UID\u8bbe\u4e3a0\u6709\u4ec0\u4e48\u672c\u8d28\u533a\u522b&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u52a0\u5165sudo\u7ec4&#xff1a;\u7528\u6237\u4ecd\u7136\u662f\u666e\u901a\u7528\u6237&#xff0c;UID\u4e0d\u662f0&#xff08;\u901a\u5e38\u662f1000\u4ee5\u4e0a&#xff09;\u3002\u53ea\u6709\u901a\u8fc7sudo\u6267\u884c\u547d\u4ee4\u65f6&#xff0c;\u624d\u4f1a\u4e34\u65f6\u4ee5root\u6743\u9650\u8fd0\u884c\u6307\u5b9a\u547d\u4ee4\u3002\u8fd9\u662f\u4e00\u79cd&#034;\u53d7\u63a7\u63d0\u6743&#034;\u673a\u5236&#xff0c;\u53ef\u4ee5\u7cbe\u786e\u63a7\u5236\u54ea\u4e9b\u7528\u6237\u80fd\u6267\u884c\u54ea\u4e9b\u547d\u4ee4&#xff08;\u901a\u8fc7\/etc\/sudoers\u914d\u7f6e\u6587\u4ef6&#xff09;&#xff0c;\u5e76\u4e14\u6240\u6709sudo\u64cd\u4f5c\u90fd\u4f1a\u88ab\u8bb0\u5f55\u5230\u65e5\u5fd7\u4e2d&#xff0c;\u4fbf\u4e8e\u5ba1\u8ba1\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">UID\u8bbe\u4e3a0&#xff1a;\u8be5\u8d26\u6237\u5728\u7cfb\u7edf\u5c42\u9762\u4f1a\u88ab\u76f4\u63a5\u5f53\u4f5croot\u7528\u6237&#xff0c;\u62e5\u6709\u51e0\u4e4e\u5168\u90e8\u7684\u8d85\u7ea7\u7528\u6237\u6743\u9650&#xff0c;\u5305\u62ec\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\u3001\u8bbf\u95ee\u6240\u6709\u6587\u4ef6\u3001\u5b89\u88c5\u8f6f\u4ef6\u7b49\u3002\u8fd9\u975e\u5e38\u5371\u9669&#xff0c;\u56e0\u4e3a\u4e00\u65e6\u8be5\u8d26\u6237\u88ab\u653b\u7834&#xff0c;\u653b\u51fb\u8005\u5c31\u83b7\u5f97\u4e86\u5b8c\u6574\u7684\u7cfb\u7edf\u63a7\u5236\u6743\u3002\u800c\u4e14UID&#061;0\u7684\u8d26\u6237\u65e0\u6cd5\u88absudo\u673a\u5236\u9650\u5236&#xff0c;\u6ca1\u6709\u4efb\u4f55\u5ba1\u8ba1\u8ffd\u8e2a\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u672c\u8d28\u533a\u522b&#xff1a;sudo\u7ec4\u662f&#034;\u53d7\u63a7\u7684\u3001\u4e34\u65f6\u7684\u3001\u53ef\u5ba1\u8ba1\u7684\u63d0\u6743&#034;&#xff0c;\u800cUID\u8bbe\u4e3a0\u662f&#034;\u76f4\u63a5\u83b7\u5f97\u5b8c\u6574\u7684root\u6743\u9650&#034;&#xff0c;\u540e\u8005\u6781\u5176\u4e0d\u5b89\u5168&#xff0c;\u751f\u4ea7\u73af\u5883\u4e2d\u4e25\u7981\u8fd9\u6837\u505a\u3002<\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><span style=\"color:#1a5c9e\">3<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">su<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4\u5207\u6362\u7528\u6237<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u547d\u4ee4su\u662f\u5426\u53ef\u4ee5\u7528\u6765\u5207\u6362\u5230\u5f53\u524d\u6ca1\u6709\u767b\u5f55\u7684\u7528\u6237&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u53ef\u4ee5\u3002su&#xff08;switch user&#xff09;\u547d\u4ee4\u5207\u6362\u7684\u662f\u7cfb\u7edf\u8d26\u6237\u8eab\u4efd&#xff0c;\u4e0d\u8981\u6c42\u8be5\u7528\u6237\u5df2\u7ecf\u767b\u5f55\u5230\u7cfb\u7edf\u4e2d\u3002su\u53ea\u9700\u8981\u77e5\u9053\u76ee\u6807\u7528\u6237\u7684\u5bc6\u7801&#xff08;\u5207\u6362\u5230root\u65f6\u4e0d\u9700\u8981\u5bc6\u7801&#xff0c;\u56e0\u4e3a\u5f53\u524d\u7528\u6237\u5df2\u7ecf\u662froot&#xff09;&#xff0c;\u5c31\u53ef\u4ee5\u5207\u6362\u8eab\u4efd\u6267\u884c\u547d\u4ee4\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4f46\u9700\u8981\u6ce8\u610f&#xff1a;\u5982\u679c\u88ab\u5207\u6362\u7528\u6237\u7684\u767b\u5f55Shell\u8bbe\u7f6e\u4e3a\/sbin\/nologin\u6216\/bin\/false&#xff0c;\u5219\u4ea4\u4e92\u5f0f\u767b\u5f55\u4f1a\u5931\u8d25&#xff08;\u56e0\u4e3a\u7cfb\u7edf\u4e0d\u5141\u8bb8\u8be5\u7528\u6237\u8fdb\u884c\u4ea4\u4e92\u5f0f\u767b\u5f55&#xff09;\u3002\u6b64\u65f6\u53ef\u4ee5\u7528\u4ee5\u4e0b\u65b9\u5f0f\u4f7f\u7528\u8be5\u7528\u6237\u8eab\u4efd\u6267\u884c\u547d\u4ee4&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo su -s \/bin\/bash \u7528\u6237\u540d -c &#034;\u547d\u4ee4&#034;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u8fd9\u6761\u547d\u4ee4\u4f1a\u4ee5\u6307\u5b9a\u7528\u6237\u8eab\u4efd\u6267\u884c\u5355\u6761\u547d\u4ee4&#xff0c;\u800c\u4e0d\u9700\u8981\u4ea4\u4e92\u5f0f\u767b\u5f55\u3002<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">4.2 <\/span><span style=\"color:#1a5c9e\">\u4efb\u52a1<\/span><span style=\"color:#1a5c9e\">2<\/span><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><\/span><\/h3>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><span style=\"color:#1a5c9e\">4<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">Permission denied<\/span><span style=\"color:#1a5c9e\">\u6392\u67e5<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u5b9e\u9a8c\u4e2d\u6211\u4eec\u4fee\u6539\u4e86pwd.sh\u7684\u6743\u9650\u4e3ar-xr&#8211;r&#8211;&#xff08;\u5373544&#xff09;\u3002\u5982\u679c\u6b64\u65f6\u53d1\u73b0\u6267\u884c\u8be5\u811a\u672c\u65f6\u4f9d\u7136\u63d0\u793a&#034;Permission denied&#034;&#xff0c;\u9664\u4e86\u6587\u4ef6\u672c\u8eab\u7684\u6267\u884c\u6743\u9650\u5916&#xff0c;\u8fd8\u9700\u8981\u68c0\u67e5\u54ea\u4e2a\u5bb9\u6613\u88ab\u5ffd\u89c6\u7684\u6743\u9650&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u9664\u4e86\u6587\u4ef6\u672c\u8eab\u7684\u6267\u884c\u6743\u9650\u5916&#xff0c;\u8fd8\u9700\u8981\u68c0\u67e5\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u53ca\u5176\u6240\u6709\u4e0a\u7ea7\u76ee\u5f55\u662f\u5426\u6709\u6267\u884c\u6743\u9650&#xff08;x\u6743\u9650&#xff09;\u3002Linux\u7684\u8def\u5f84\u89e3\u6790\u673a\u5236\u8981\u6c42&#xff1a;\u8981\u8bbf\u95ee\u67d0\u4e2a\u8def\u5f84\u4e0a\u7684\u4efb\u610f\u8282\u70b9&#xff08;\u6587\u4ef6\u6216\u76ee\u5f55&#xff09;&#xff0c;\u7528\u6237\u5bf9\u8def\u5f84\u4e2d\u6bcf\u4e00\u7ea7\u76ee\u5f55\u90fd\u5fc5\u987b\u6709\u6267\u884c&#xff08;x&#xff09;\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4f8b\u5982&#xff0c;\u8981\u6267\u884c\/home\/zouhuixin0217\/\u684c\u9762\/pwd.sh&#xff0c;\u7528\u6237\u9700\u8981\u5bf9\/home\u3001\/home\/zouhuixin0217\u3001\/home\/zouhuixin0217\/\u684c\u9762\u8fd9\u4e09\u4e2a\u76ee\u5f55\u90fd\u6709x\u6743\u9650\u3002\u5982\u679c\u684c\u9762\u76ee\u5f55\u6ca1\u6709x\u6743\u9650&#xff0c;\u5373\u4f7fpwd.sh\u6587\u4ef6\u672c\u8eab\u6709\u6267\u884c\u6743\u9650&#xff0c;\u7528\u6237\u4e5f\u65e0\u6cd5\u901a\u8fc7.\/pwd.sh\u6765\u6267\u884c\u5b83\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6392\u67e5\u65b9\u6cd5&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">ls -ld \/home\/zouhuixin0217\/\u684c\u9762<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5982\u679c\u76ee\u5f55\u6743\u9650\u4e2d\u6ca1\u6709x&#xff0c;\u53ef\u4ee5\u4f7f\u7528chmod &#043;x\u76ee\u5f55\u540d\u6765\u6dfb\u52a0\u6267\u884c\u6743\u9650\u3002<\/p>\n<h4 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u601d\u8003\u9898<\/span><span style=\"color:#1a5c9e\">5<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">umask<\/span><span style=\"color:#1a5c9e\">\u4e0e\u9ed8\u8ba4\u6743\u9650<\/span><\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0\">\u9898\u76ee&#xff1a;\u5f53\u6211\u4eec\u5728\u7ec8\u7aef\u6267\u884cecho pwd &gt;&gt; pwd.sh\u65f6&#xff0c;\u7cfb\u7edf\u662f\u5982\u4f55\u51b3\u5b9a\u8fd9\u4e2a\u65b0\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650\u7684&#xff1f;\u5982\u679c\u60f3\u8ba9\u4ee5\u540e\u65b0\u5efa\u7684\u6587\u4ef6\u9ed8\u8ba4\u4e0d\u5141\u8bb8&#034;\u5176\u4ed6\u7528\u6237&#034;\u8bfb\u53d6&#xff0c;\u5e94\u8be5\u600e\u4e48\u505a&#xff1f;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"color:#cc0000\">\u7b54\u6848&#xff1a;<\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u65b0\u5efa\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650\u7531umask&#xff08;\u7528\u6237\u6587\u4ef6\u521b\u5efa\u63a9\u7801&#xff09;\u51b3\u5b9a\u3002\u7cfb\u7edf\u521b\u5efa\u6587\u4ef6\u65f6\u7684\u8ba1\u7b97\u65b9\u5f0f\u4e3a&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650 &#061; 666 &#8211; umask&#xff08;\u6587\u4ef6\u9ed8\u8ba4\u6ca1\u6709\u6267\u884c\u6743\u9650&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650 &#061; 777 &#8211; umask&#xff08;\u76ee\u5f55\u9ed8\u8ba4\u6709\u6267\u884c\u6743\u9650&#xff09;<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u4f8b\u5982&#xff0c;\u5f53umask\u4e3a0022\u65f6&#xff1a;\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650&#061;666-022&#061;644&#xff08;rw-r&#8211;r&#8211;&#xff09;&#xff0c;\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650&#061;777-022&#061;755&#xff08;rwxr-xr-x&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u5982\u679c\u60f3\u8ba9\u4ee5\u540e\u65b0\u5efa\u7684\u6587\u4ef6\u9ed8\u8ba4\u4e0d\u5141\u8bb8&#034;\u5176\u4ed6\u7528\u6237&#034;\u8bfb\u53d6&#xff0c;\u53ef\u4ee5\u5c06umask\u6539\u4e3a0027&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">umask 0027<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u6b64\u65f6\u65b0\u5efa\u6587\u4ef6\u9ed8\u8ba4\u6743\u9650&#061;666-027&#061;640&#xff08;rw-r&#8212;&#8211;&#xff09;&#xff0c;\u5176\u4ed6\u7528\u6237\u4e0d\u53ef\u8bfb&#xff1b;\u65b0\u5efa\u76ee\u5f55\u9ed8\u8ba4\u6743\u9650&#061;777-027&#061;750&#xff08;rwxr-x&#8212;&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u82e5\u8981\u6c38\u4e45\u751f\u6548&#xff0c;\u53ef\u5c06umask\u8bbe\u7f6e\u5199\u5165~\/.bashrc\u6587\u4ef6&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">echo &#034;umask 0027&#034; &gt;&gt; ~\/.bashrc<br \/>\nsource ~\/.bashrc<\/span><\/span><\/p>\n<h2 style=\"margin-left:0;margin-right:0\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u4e94\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/span><\/span><\/h2>\n<p style=\"margin-left:0;margin-right:0\">\u5728\u5b9e\u9a8c\u8fc7\u7a0b\u4e2d&#xff0c;\u53ef\u80fd\u4f1a\u9047\u5230\u4ee5\u4e0b\u5e38\u89c1\u95ee\u9898\u3002\u6574\u7406\u5982\u4e0b\u4f9b\u53c2\u8003&#xff1a;<\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">1<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">useradd<\/span><span style=\"color:#1a5c9e\">\u521b\u5efa\u7528\u6237\u540e\u5bb6\u76ee\u5f55\u4e0d\u5b58\u5728<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u4f7f\u7528useradd\u521b\u5efa\u7528\u6237\u540e&#xff0c;\u53d1\u73b0\/home\/\u76ee\u5f55\u4e0b\u6ca1\u6709\u5bf9\u5e94\u7528\u6237\u7684\u5bb6\u76ee\u5f55&#xff0c;\u7528\u6237\u767b\u5f55\u65f6\u62a5\u9519\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e0&#xff1a;useradd\u547d\u4ee4\u9ed8\u8ba4\u884c\u4e3a\u56e0\u7cfb\u7edf\u914d\u7f6e\u800c\u5f02\u3002\u5728\u67d0\u4e9b\u7cfb\u7edf&#xff08;\u5982Kali Linux&#xff09;\u4e2d&#xff0c;\/etc\/login.defs\u6587\u4ef6\u4e2d\u7684CREATE_HOME\u8bbe\u7f6e\u53ef\u80fd\u4e3ano&#xff0c;\u5bfc\u81f4\u4e0d\u81ea\u52a8\u521b\u5efa\u5bb6\u76ee\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\"># \u65b9\u6cd51&#xff1a;\u521b\u5efa\u7528\u6237\u65f6\u52a0\u4e0a-m\u53c2\u6570<br \/>\nsudo useradd -m \u7528\u6237\u540d<\/p>\n<p># \u65b9\u6cd52&#xff1a;\u624b\u52a8\u521b\u5efa\u5bb6\u76ee\u5f55\u5e76\u8bbe\u7f6e\u6743\u9650<br \/>\nsudo mkdir \/home\/\u7528\u6237\u540d<br \/>\nsudo chown \u7528\u6237\u540d:\u7528\u6237\u540d \/home\/\u7528\u6237\u540d<br \/>\nsudo cp \/etc\/skel\/.bashrc \/etc\/skel\/.profile \/home\/\u7528\u6237\u540d\/<br \/>\nsudo chown \u7528\u6237\u540d:\u7528\u6237\u540d \/home\/\u7528\u6237\u540d\/.bashrc \/home\/\u7528\u6237\u540d\/.profile<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">2<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">passwd<\/span><span style=\"color:#1a5c9e\">\u9501\u5b9a\u540e\u65e0\u6cd5\u89e3\u9501<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u4f7f\u7528passwd -l\u9501\u5b9a\u7528\u6237\u540e&#xff0c;\u4f7f\u7528passwd -u\u89e3\u9501\u65f6\u62a5\u9519&#034;passwd: Failed to unlock for user&#034;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e0&#xff1a;\u5f53\u7528\u6237\u5bc6\u7801\u4e3a\u7a7a\u65f6&#xff0c;passwd -l\u4e0d\u4f1a\u5728\u5bc6\u7801\u524d\u52a0!&#xff0c;\u800c\u662f\u5c06\u5bc6\u7801\u5b57\u6bb5\u6539\u4e3a*&#xff08;\u8868\u793a\u65e0\u5bc6\u7801\u53ef\u767b\u5f55&#xff09;\u3002\u6b64\u65f6passwd -u\u65e0\u6cd5\u89e3\u9501&#xff0c;\u56e0\u4e3a\u5e76\u6ca1\u6709\u771f\u6b63\u9501\u5b9a\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\"># \u5148\u8bbe\u7f6e\u5bc6\u7801\u518d\u9501\u5b9a<br \/>\nsudo passwd \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u5148\u8bbe\u7f6e\u5bc6\u7801<br \/>\nsudo passwd -l \u7528\u6237\u540d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # \u518d\u9501\u5b9a<\/p>\n<p># \u5982\u679c\u5df2\u7ecf\u51fa\u73b0\u9501\u5b9a\u5931\u8d25&#xff0c;\u53ef\u4ee5\u624b\u52a8\u7f16\u8f91\/etc\/shadow<br \/>\nsudo nano \/etc\/shadow<br \/>\n# \u627e\u5230\u5bf9\u5e94\u7528\u6237\u884c&#xff0c;\u786e\u4fdd\u5bc6\u7801\u5b57\u6bb5\u4ee5!\u5f00\u5934&#xff08;\u5982!$6$&#8230;&#xff09;<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">3<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">usermod<\/span><span style=\"color:#1a5c9e\">\u4fee\u6539\u7528\u6237\u540d\u5931\u8d25<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u4f7f\u7528usermod -l\u4fee\u6539\u7528\u6237\u540d\u65f6\u62a5\u9519&#034;usermod: user jsj0217 is currently used by process XXXX&#034;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e0&#xff1a;\u76ee\u6807\u7528\u6237\u5f53\u524d\u6709\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b&#xff08;\u5373\u8be5\u7528\u6237\u8fd8\u767b\u5f55\u7740&#xff09;&#xff0c;usermod\u65e0\u6cd5\u4fee\u6539\u6b63\u5728\u4f7f\u7528\u4e2d\u7684\u7528\u6237\u8d26\u6237\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\"># \u65b9\u6cd51&#xff1a;\u5f3a\u5236\u7ec8\u6b62\u8be5\u7528\u6237\u7684\u6240\u6709\u4f1a\u8bdd<br \/>\nsudo pkill -u \u7528\u6237\u540d<br \/>\n# \u7136\u540e\u518d\u6267\u884c\u4fee\u6539<br \/>\nsudo usermod -l \u65b0\u7528\u6237\u540d \u539f\u7528\u6237\u540d<\/p>\n<p># \u65b9\u6cd52&#xff1a;\u4ecetty\u6216\u5176\u4ed6\u4f1a\u8bdd\u4e2d\u6ce8\u9500\u8be5\u7528\u6237<br \/>\n# \u7136\u540e\u5728\u56fe\u5f62\u754c\u9762\u7ec8\u7aef\u6267\u884c\u4fee\u6539<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">4<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">chmod<\/span><span style=\"color:#1a5c9e\">\u4fee\u6539\u6743\u9650\u540e\u4ecd\u65e0\u6cd5\u6267\u884c<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u5bf9\u811a\u672c\u6587\u4ef6\u6267\u884c\u4e86chmod &#043;x\u540e&#xff0c;\u6267\u884c\u65f6\u4ecd\u7136\u63d0\u793a&#034;Permission denied&#034;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e01&#xff1a;\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u6ca1\u6709\u6267\u884c\u6743\u9650&#xff08;x\u6743\u9650&#xff09;\u3002Linux\u8def\u5f84\u89e3\u6790\u8981\u6c42\u5bf9\u8def\u5f84\u4e0a\u6bcf\u4e00\u7ea7\u76ee\u5f55\u90fd\u6709x\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68481&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">ls -ld \/path\/to\/directory<br \/>\nchmod &#043;x \/path\/to\/directory<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e02&#xff1a;\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d\u65f6\u4f7f\u7528\u4e86noexec\u9009\u9879&#xff08;\u5e38\u89c1\u4e8e\/tmp\u7b49\u4e34\u65f6\u76ee\u5f55&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68482&#xff1a;\u91cd\u65b0\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u65f6\u53bb\u6389noexec\u9009\u9879&#xff0c;\u6216\u5c06\u811a\u672c\u79fb\u5230\u5141\u8bb8\u6267\u884c\u7684\u76ee\u5f55\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e03&#xff1a;SELinux\u6216AppArmor\u7b49\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236\u6a21\u5757\u963b\u6b62\u4e86\u6267\u884c\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68483&#xff1a;\u4e34\u65f6\u7981\u7528SELinux&#xff08;\u4e0d\u63a8\u8350\u751f\u4ea7\u73af\u5883&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo setenforce 0\u00a0 # \u4e34\u65f6\u7981\u7528<br \/>\n# \u6216\u4fee\u6539SELinux\u4e0a\u4e0b\u6587&#xff1a;<br \/>\nsudo chcon -t bin_t \u6587\u4ef6\u540d<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">5<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">su<\/span><span style=\"color:#1a5c9e\">\u5207\u6362\u7528\u6237\u63d0\u793a<\/span><span style=\"color:#1a5c9e\">&#034;Authentication failure&#034;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u4f7f\u7528su\u5207\u6362\u5230\u5176\u4ed6\u7528\u6237\u65f6\u63d0\u793a&#034;Authentication failure&#034;&#xff0c;\u4f46\u5bc6\u7801\u786e\u8ba4\u65e0\u8bef\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e01&#xff1a;\u76ee\u6807\u7528\u6237\u5bc6\u7801\u672a\u8bbe\u7f6e&#xff08;\u65b0\u521b\u5efa\u7684\u7528\u6237\u53ef\u80fd\u6ca1\u6709\u5bc6\u7801&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68481&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo passwd \u7528\u6237\u540d\u00a0\u00a0\u00a0 # \u5148\u8bbe\u7f6e\u5bc6\u7801<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e02&#xff1a;\u76ee\u6807\u7528\u6237\u7684\u767b\u5f55Shell\u88ab\u8bbe\u7f6e\u4e3a\/sbin\/nologin\u6216\/bin\/false\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68482&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo chsh -s \/bin\/bash \u7528\u6237\u540d\u00a0\u00a0\u00a0 # \u4fee\u6539\u767b\u5f55Shell\u4e3abash<\/span><\/span><\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e03&#xff1a;\/etc\/shadow\u6587\u4ef6\u6743\u9650\u4e0d\u6b63\u786e&#xff08;\u5e94\u4e3a640\u6216600&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u68483&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\">sudo chmod 640 \/etc\/shadow<\/span><\/span><\/p>\n<h3 style=\"margin-left:0;margin-right:0\"><span style=\"color:#4f81bd\"><span style=\"color:#1a5c9e\">\u95ee\u9898<\/span><span style=\"color:#1a5c9e\">6<\/span><span style=\"color:#1a5c9e\">&#xff1a;<\/span><span style=\"color:#1a5c9e\">sudo<\/span><span style=\"color:#1a5c9e\">\u547d\u4ee4\u63d0\u793a<\/span><span style=\"color:#1a5c9e\">&#034;<\/span><span style=\"color:#1a5c9e\">\u4e0d\u5728<\/span><span style=\"color:#1a5c9e\">sudoers<\/span><span style=\"color:#1a5c9e\">\u6587\u4ef6\u4e2d<\/span><span style=\"color:#1a5c9e\">&#034;<\/span><\/span><\/h3>\n<p style=\"margin-left:0;margin-right:0\">\u73b0\u8c61&#xff1a;\u666e\u901a\u7528\u6237\u6267\u884csudo\u547d\u4ee4\u65f6\u62a5\u9519&#034;xxx is not in the sudoers file. This incident will be reported.&#034;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u539f\u56e0&#xff1a;\u8be5\u7528\u6237\u672a\u88ab\u6dfb\u52a0\u5230sudo\u7ec4&#xff0c;\u6216\u8005\/etc\/sudoers\u6587\u4ef6\u4e2d\u6ca1\u6709\u914d\u7f6e\u8be5\u7528\u6237\u7684sudo\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\"><span style=\"background-color:whitesmoke\"><span style=\"color:#333333\"># \u65b9\u6cd51&#xff1a;\u5c06\u7528\u6237\u52a0\u5165sudo\u7ec4&#xff08;\u63a8\u8350&#xff09;<br \/>\nsudo usermod -aG sudo \u7528\u6237\u540d<\/p>\n<p># \u65b9\u6cd52&#xff1a;\u76f4\u63a5\u7f16\u8f91sudoers\u6587\u4ef6&#xff08;\u9700\u8c28\u614e&#xff09;<br \/>\nsudo visudo<br \/>\n# \u5728root ALL&#061;(ALL:ALL) ALL\u4e0b\u65b9\u6dfb\u52a0&#xff1a;<br \/>\n\u7528\u6237\u540d ALL&#061;(ALL:ALL) ALL<\/span><\/span><\/p>\n<h2 style=\"margin-left:0;margin-right:0\"><span style=\"color:#365f91\"><span style=\"color:#1a5c9e\">\u516d\u3001\u5b9e\u9a8c\u603b\u7ed3<\/span><\/span><\/h2>\n<p style=\"margin-left:0;margin-right:0\">\u672c\u6b21\u5b9e\u9a8c\u56f4\u7ed5Linux\u7cfb\u7edf\u7684\u7528\u6237\u8d26\u6237\u7ba1\u7406\u4e0e\u6587\u4ef6\u6743\u9650\u7ba1\u7406\u4e24\u5927\u6838\u5fc3\u4e3b\u9898\u5c55\u5f00&#xff0c;\u901a\u8fc7\u52a8\u624b\u5b9e\u8df5\u6df1\u5165\u7406\u89e3\u4e86Linux\u591a\u7528\u6237\u591a\u4efb\u52a1\u73af\u5883\u4e0b\u7684\u5b89\u5168\u673a\u5236\u3002\u4ee5\u4e0b\u662f\u672c\u6b21\u5b9e\u9a8c\u7684\u4e3b\u8981\u6536\u83b7\u548c\u5fc3\u5f97\u4f53\u4f1a&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b2c\u4e00&#xff0c;\u7528\u6237\u8d26\u6237\u7ba1\u7406\u662fLinux\u7cfb\u7edf\u7ba1\u7406\u7684\u57fa\u7840\u3002\u901a\u8fc7useradd\u3001usermod\u3001passwd\u7b49\u547d\u4ee4&#xff0c;\u6211\u638c\u63e1\u4e86\u521b\u5efa\u7528\u6237\u3001\u4fee\u6539\u7528\u6237\u5c5e\u6027\u3001\u8bbe\u7f6e\u548c\u9501\u5b9a\u5bc6\u7801\u7684\u5b8c\u6574\u6d41\u7a0b\u3002\u7279\u522b\u662f\u5728\u5b9e\u8df5passwd -l\u9501\u5b9a\u548cpasswd -u\u89e3\u9501\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u6211\u76f4\u89c2\u5730\u7406\u89e3\u4e86\u7528\u6237\u5bc6\u7801\u72b6\u6001\u7ba1\u7406\u7684\u5de5\u4f5c\u673a\u5236\u2014\u2014\u9501\u5b9a\u5b9e\u9645\u4e0a\u662f\u5728shadow\u6587\u4ef6\u7684\u5bc6\u7801\u5b57\u6bb5\u524d\u6dfb\u52a0!\u7b26\u53f7&#xff0c;\u800c\u89e3\u9501\u5219\u662f\u79fb\u9664\u8be5\u7b26\u53f7\u3002\u8fd9\u4e00\u8fc7\u7a0b\u8ba9\u6211\u5bf9Linux\u7684\u8ba4\u8bc1\u673a\u5236\u6709\u4e86\u66f4\u6df1\u523b\u7684\u8ba4\u8bc6\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b2c\u4e8c&#xff0c;\u6587\u4ef6\u6743\u9650\u6a21\u578b\u662fLinux\u5b89\u5168\u4f53\u7cfb\u7684\u6838\u5fc3\u3002\u901a\u8fc7umask\u3001chmod\u3001chown\u7b49\u547d\u4ee4\u7684\u5b9e\u8df5\u64cd\u4f5c&#xff0c;\u6211\u7406\u89e3\u4e86rwx\u4e09\u7c7b\u6743\u9650&#xff08;\u8bfb\u3001\u5199\u3001\u6267\u884c&#xff09;\u5982\u4f55\u5206\u522b\u5e94\u7528\u4e8e\u4e09\u7c7b\u7528\u6237&#xff08;\u5c5e\u4e3b\u3001\u7ec4\u3001\u5176\u4ed6&#xff09;&#xff0c;\u4ee5\u53ca\u6570\u5b57\u6cd5&#xff08;\u5982755\u3001644&#xff09;\u548c\u7b26\u53f7\u6cd5&#xff08;\u5982u&#043;x\u3001g-w&#xff09;\u4e24\u79cd\u6743\u9650\u4fee\u6539\u65b9\u5f0f\u7684\u5dee\u5f02\u3002\u7279\u522b\u503c\u5f97\u4e00\u63d0\u7684\u662f&#xff0c;\u5728\u5b9e\u9a8c\u4e2d\u53d1\u73b0\u5373\u4f7f\u6587\u4ef6\u672c\u8eab\u8bbe\u7f6e\u4e86\u6267\u884c\u6743\u9650&#xff0c;\u5982\u679c\u6240\u5728\u76ee\u5f55\u7f3a\u5c11x\u6743\u9650&#xff0c;\u4ecd\u7136\u65e0\u6cd5\u6267\u884c\u6587\u4ef6\u2014\u2014\u8fd9\u4e00\u53d1\u73b0\u8ba9\u6211\u6df1\u523b\u8ba4\u8bc6\u5230Linux\u6743\u9650\u68c0\u67e5\u662f\u8def\u5f84\u7ea7\u522b\u7684&#xff0c;\u9700\u8981\u5bf9\u8def\u5f84\u4e0a\u6bcf\u4e00\u7ea7\u76ee\u5f55\u90fd\u6709\u76f8\u5e94\u6743\u9650\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b2c\u4e09&#xff0c;umask\u673a\u5236\u7684\u8bbe\u8ba1\u4f53\u73b0\u4e86Linux\u7684&#034;\u6700\u5c0f\u6743\u9650\u539f\u5219&#034;\u3002\u9ed8\u8ba4umask\u503c0022\u786e\u4fdd\u65b0\u7528\u6237\u521b\u5efa\u7684\u6587\u4ef6\u5bf9\u5176\u4ed6\u7528\u6237\u53ea\u6709\u8bfb\u6743\u9650\u800c\u6ca1\u6709\u5199\u6743\u9650&#xff0c;\u6709\u6548\u9632\u6b62\u4e86\u672a\u7ecf\u6388\u6743\u7684\u6587\u4ef6\u4fee\u6539\u3002\u901a\u8fc7\u4fee\u6539umask\u503c&#xff08;\u5982\u6539\u4e3a0027&#xff09;&#xff0c;\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6536\u7d27\u6743\u9650\u7b56\u7565&#xff0c;\u6ee1\u8db3\u4e0d\u540c\u5b89\u5168\u7b49\u7ea7\u7684\u9700\u6c42\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b2c\u56db&#xff0c;su\u4e0esudo\u7684\u533a\u522b\u8ba9\u6211\u7406\u89e3\u4e86&#034;\u6700\u5c0f\u6743\u9650\u539f\u5219&#034;\u5728\u5b9e\u8df5\u4e2d\u7684\u91cd\u8981\u6027\u3002sudo\u63d0\u4f9b\u4e86\u4e00\u79cd\u5b89\u5168\u7684\u4e34\u65f6\u63d0\u6743\u673a\u5236&#xff0c;\u65e2\u4fdd\u8bc1\u4e86\u7ba1\u7406\u5458\u80fd\u591f\u6267\u884c\u5fc5\u8981\u7684\u7cfb\u7edf\u7ba1\u7406\u64cd\u4f5c&#xff0c;\u53c8\u901a\u8fc7\u65e5\u5fd7\u5ba1\u8ba1\u548c\u6743\u9650\u7ec6\u7c92\u5ea6\u63a7\u5236\u964d\u4f4e\u4e86\u5b89\u5168\u98ce\u9669\u3002\u76f8\u6bd4\u4e4b\u4e0b&#xff0c;\u76f4\u63a5\u5c06UID\u8bbe\u4e3a0\u7684\u505a\u6cd5\u867d\u7136\u7b80\u5355\u7c97\u66b4&#xff0c;\u4f46\u4e25\u91cd\u8fdd\u80cc\u4e86\u5b89\u5168\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u7b2c\u4e94&#xff0c;\u5b9e\u9a8c\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u5404\u79cd\u95ee\u9898&#xff08;\u5982\u5bc6\u7801\u9501\u5b9a\u540e\u65e0\u6cd5\u767b\u5f55\u3001usermod\u56e0\u7528\u6237\u767b\u5f55\u4e2d\u800c\u5931\u8d25\u3001chmod\u540e\u4ecd\u62a5Permission denied\u7b49&#xff09;\u6070\u6070\u662f\u5b66\u4e60\u7684\u6700\u4f73\u5951\u673a\u3002\u6bcf\u4e00\u4e2a\u9519\u8bef\u7684\u6392\u67e5\u8fc7\u7a0b\u90fd\u52a0\u6df1\u4e86\u5bf9Linux\u7cfb\u7edf\u5de5\u4f5c\u673a\u5236\u7684\u7406\u89e3&#xff0c;\u4e5f\u8ba9\u6211\u517b\u6210\u4e86&#034;\u5148\u67e5\u770b\u6743\u9650\u518d\u6267\u884c\u64cd\u4f5c&#034;\u7684\u826f\u597d\u4e60\u60ef\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u603b\u4f53\u800c\u8a00&#xff0c;\u672c\u6b21\u5b9e\u9a8c\u5c06\u64cd\u4f5c\u7cfb\u7edf\u7406\u8bba\u77e5\u8bc6\u4e0eLinux\u52a8\u624b\u5b9e\u8df5\u7d27\u5bc6\u7ed3\u5408&#xff0c;\u4ece\u7528\u6237\u7ba1\u7406\u7684\u5e95\u5c42\u673a\u5236\u5230\u6587\u4ef6\u6743\u9650\u7684\u5177\u4f53\u64cd\u4f5c&#xff0c;\u6784\u5efa\u4e86\u4e00\u4e2a\u8f83\u4e3a\u5b8c\u6574\u7684\u77e5\u8bc6\u4f53\u7cfb\u3002\u8fd9\u4e9b\u6280\u80fd\u4e0d\u4ec5\u662f\u7f51\u7edc\u5b89\u5168\u4e13\u4e1a\u5b66\u751f\u7684\u57fa\u7840\u7d20\u517b&#xff0c;\u4e5f\u662f\u672a\u6765\u4ece\u4e8b\u7cfb\u7edf\u7ba1\u7406\u3001\u5b89\u5168\u8fd0\u7ef4\u7b49\u5de5\u4f5c\u7684\u5fc5\u5907\u80fd\u529b\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0\">\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:center\"><span style=\"color:#999999\">\u2014 <\/span><span style=\"color:#999999\">\u5168\u6587\u5b8c<\/span><span style=\"color:#999999\"> \u2014<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u77e5\u8bc6\u70b9\u603b\u7ed31.1 \u7528\u6237\u8d26\u6237\u7ba1\u7406\u57fa\u7840Linux\u662f\u4e00\u4e2a\u591a\u7528\u6237\u591a\u4efb\u52a1\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u552f\u4e00\u7684\u7528\u6237\u540d\u548c\u7528\u6237\u6807\u8bc6\u7b26&#xff08;UID&#xff09;\u3002\u7528\u6237\u7ba1\u7406\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\u6700\u57fa\u672c\u7684\u5de5\u4f5c\u4e4b\u4e00\u3002\u5e38\u7528\u547d\u4ee4&#xff1a;useradd [\u9009\u9879] \u7528\u6237\u540d\u4e3b\u8981\u53c2\u6570\u8bf4\u660e&#xff1a;-m&#xff1a;\u81ea\u52a8\u521b\u5efa\u7528\u6237\u4e3b\u76ee\u5f55&#xff08;\/home\/\u7528\u6237\u540d&#xff09;-s&#xff1a;\u6307\u5b9a\u7528\u6237\u767b\u5f55Shell&#xff08;\u5982\/bin\/bash&#xff09;-G&amp;#x<\/p>\n","protected":false},"author":2,"featured_media":120861,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9098,130,50,87,323,427],"topic":[],"class_list":["post-120881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-it","tag-chrome","tag-50","tag-87","tag-323","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/120881.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u77e5\u8bc6\u70b9\u603b\u7ed31.1 \u7528\u6237\u8d26\u6237\u7ba1\u7406\u57fa\u7840Linux\u662f\u4e00\u4e2a\u591a\u7528\u6237\u591a\u4efb\u52a1\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u552f\u4e00\u7684\u7528\u6237\u540d\u548c\u7528\u6237\u6807\u8bc6\u7b26&#xff08;UID&#xff09;\u3002\u7528\u6237\u7ba1\u7406\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\u6700\u57fa\u672c\u7684\u5de5\u4f5c\u4e4b\u4e00\u3002\u5e38\u7528\u547d\u4ee4&#xff1a;useradd [\u9009\u9879] \u7528\u6237\u540d\u4e3b\u8981\u53c2\u6570\u8bf4\u660e&#xff1a;-m&#xff1a;\u81ea\u52a8\u521b\u5efa\u7528\u6237\u4e3b\u76ee\u5f55&#xff08;\/home\/\u7528\u6237\u540d&#xff09;-s&#xff1a;\u6307\u5b9a\u7528\u6237\u767b\u5f55Shell&#xff08;\u5982\/bin\/bash&#xff09;-G&amp;#x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120881.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-01T08:49:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0b8aef6.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120881.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120881.html\",\"name\":\"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-01T08:49:18+00:00\",\"dateModified\":\"2026-11-01T08:49:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120881.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120881.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120881.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/120881.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u77e5\u8bc6\u70b9\u603b\u7ed31.1 \u7528\u6237\u8d26\u6237\u7ba1\u7406\u57fa\u7840Linux\u662f\u4e00\u4e2a\u591a\u7528\u6237\u591a\u4efb\u52a1\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u552f\u4e00\u7684\u7528\u6237\u540d\u548c\u7528\u6237\u6807\u8bc6\u7b26&#xff08;UID&#xff09;\u3002\u7528\u6237\u7ba1\u7406\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\u6700\u57fa\u672c\u7684\u5de5\u4f5c\u4e4b\u4e00\u3002\u5e38\u7528\u547d\u4ee4&#xff1a;useradd [\u9009\u9879] \u7528\u6237\u540d\u4e3b\u8981\u53c2\u6570\u8bf4\u660e&#xff1a;-m&#xff1a;\u81ea\u52a8\u521b\u5efa\u7528\u6237\u4e3b\u76ee\u5f55&#xff08;\/home\/\u7528\u6237\u540d&#xff09;-s&#xff1a;\u6307\u5b9a\u7528\u6237\u767b\u5f55Shell&#xff08;\u5982\/bin\/bash&#xff09;-G&amp;#x","og_url":"https:\/\/www.wsisp.com\/helps\/120881.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-01T08:49:18+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261101084915-6ae6fd0b8aef6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"12 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120881.html","url":"https:\/\/www.wsisp.com\/helps\/120881.html","name":"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-01T08:49:18+00:00","dateModified":"2026-11-01T08:49:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120881.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120881.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120881.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5b9e\u9a8c\uff1aLinux\u7528\u6237\u548c\u6743\u9650\u7ba1\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=120881"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120881\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/120861"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120881"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}