\/etc\/shadow \u6587\u4ef6\uff0c\u7528\u4e8e\u5b58\u50a8 Linux \u7cfb\u7edf\u4e2d\u7528\u6237\u7684\u5bc6\u7801\u4fe1\u606f\uff0c\u53c8\u79f0\u4e3a\u201c\u5f71\u5b50\u6587\u4ef6\u201d\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\u524d\u9762\u4ecb\u7ecd\u4e86 \/etc\/passwd \u6587\u4ef6\uff0c\u7531\u4e8e\u8be5\u6587\u4ef6\u5141\u8bb8\u6240\u6709\u7528\u6237\u8bfb\u53d6\uff0c\u6613\u5bfc\u81f4\u7528\u6237\u5bc6\u7801\u6cc4\u9732\uff0c\u56e0\u6b64 Linux \u7cfb\u7edf\u5c06\u7528\u6237\u7684\u5bc6\u7801\u4fe1\u606f\u4ece \/etc\/passwd \u6587\u4ef6\u4e2d\u5206\u79bb\u51fa\u6765\uff0c\u5e76\u5355\u72ec\u653e\u5230\u4e86\u6b64\u6587\u4ef6\u4e2d\u3002<\/p>\n
\/etc\/shadow \u6587\u4ef6\u53ea\u6709 root \u7528\u6237\u62e5\u6709\u8bfb\u6743\u9650\uff0c\u5176\u4ed6\u7528\u6237\u6ca1\u6709\u4efb\u4f55\u6743\u9650\uff0c\u8fd9\u6837\u5c31\u4fdd\u8bc1\u4e86\u7528\u6237\u5bc6\u7801\u7684\u5b89\u5168\u6027\u3002<\/p>\n
\u6ce8\u610f\uff0c\u5982\u679c\u8fd9\u4e2a\u6587\u4ef6\u7684\u6743\u9650\u53d1\u751f\u4e86\u6539\u53d8\uff0c\u5219\u9700\u8981\u6ce8\u610f\u662f\u5426\u662f\u6076\u610f\u653b\u51fb\u3002<\/p>\n
\u4ecb\u7ecd\u6b64\u6587\u4ef6\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u6253\u5f00\u770b\u770b\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n
[root@localhost ~]#vim \/etc\/shadow\r\nroot: $6$9w5Td6lg\r\n$bgpsy3olsq9WwWvS5Sst2W3ZiJpuCGDY.4w4MRk3ob\/i85fl38RH15wzVoom ff9isV1 PzdcXmixzhnMVhMxbvO:15775:0:99999:7:::\r\nbin:*:15513:0:99999:7:::\r\ndaemon:*:15513:0:99999:7:::\r\n\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u2026\r\n<\/pre>\n\u540c \/etc\/passwd \u6587\u4ef6\u4e00\u6837\uff0c\u6587\u4ef6\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u7528\u6237\uff0c\u540c\u6837\u4f7f\u7528 \":\" \u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\uff0c\u6bcf\u884c\u7528\u6237\u4fe1\u606f\u88ab\u5212\u5206\u4e3a 9 \u4e2a\u5b57\u6bb5\u3002\u6bcf\u4e2a\u5b57\u6bb5\u7684\u542b\u4e49\u5982\u4e0b\uff1a<\/p>\n
\u7528\u6237\u540d\uff1a\u52a0\u5bc6\u5bc6\u7801\uff1a\u6700\u540e\u4e00\u6b21\u4fee\u6539\u65f6\u95f4\uff1a\u6700\u5c0f\u4fee\u6539\u65f6\u95f4\u95f4\u9694\uff1a\u5bc6\u7801\u6709\u6548\u671f\uff1a\u5bc6\u7801\u9700\u8981\u53d8\u66f4\u524d\u7684\u8b66\u544a\u5929\u6570\uff1a\u5bc6\u7801\u8fc7\u671f\u540e\u7684\u5bbd\u9650\u65f6\u95f4\uff1a\u8d26\u53f7\u5931\u6548\u65f6\u95f4\uff1a\u4fdd\u7559\u5b57\u6bb5<\/p>\n
\u63a5\u4e0b\u6765\uff0c\u7ed9\u5927\u5bb6\u5206\u522b\u4ecb\u7ecd\u8fd9 9 \u4e2a\u5b57\u6bb5\u3002<\/p>\n
\u7528\u6237\u540d<\/strong><\/span><\/div>\n\u540c \/etc\/passwd \u6587\u4ef6\u7684\u7528\u6237\u540d\u6709\u76f8\u540c\u7684\u542b\u4e49\u3002<\/p>\n
\u52a0\u5bc6\u5bc6\u7801<\/strong><\/span><\/div>\n\u8fd9\u91cc\u4fdd\u5b58\u7684\u662f\u771f\u6b63\u52a0\u5bc6\u7684\u5bc6\u7801\u3002\u76ee\u524d Linux \u7684\u5bc6\u7801\u91c7\u7528\u7684\u662f SHA512 \u6563\u5217\u52a0\u5bc6\u7b97\u6cd5\uff0c\u539f\u6765\u91c7\u7528\u7684\u662f MD5 \u6216 DES \u52a0\u5bc6\u7b97\u6cd5\u3002SHA512 \u6563\u5217\u52a0\u5bc6\u7b97\u6cd5\u7684\u52a0\u5bc6\u7b49\u7ea7\u66f4\u9ad8\uff0c\u4e5f\u66f4\u52a0\u5b89\u5168\u3002<\/p>\n
\u6ce8\u610f\uff0c\u8fd9\u4e32\u5bc6\u7801\u4ea7\u751f\u7684\u4e71\u7801\u4e0d\u80fd\u624b\u5de5\u4fee\u6539\uff0c\u5982\u679c\u624b\u5de5\u4fee\u6539\uff0c\u7cfb\u7edf\u5c06\u65e0\u6cd5\u8bc6\u522b\u5bc6\u7801\uff0c\u5bfc\u81f4\u5bc6\u7801\u5931\u6548\u3002\u5f88\u591a\u8f6f\u4ef6\u900f\u8fc7\u8fd9\u4e2a\u529f\u80fd\uff0c\u5728\u5bc6\u7801\u4e32\u524d\u52a0\u4e0a \"!\"\u3001\"*\" \u6216 \"x\" \u4f7f\u5bc6\u7801\u6682\u65f6\u5931\u6548\u3002<\/p>\n
\u6240\u6709\u4f2a\u7528\u6237\u7684\u5bc6\u7801\u90fd\u662f \"!!\" \u6216 \"*\"\uff0c\u4ee3\u8868\u6ca1\u6709\u5bc6\u7801\u662f\u4e0d\u80fd\u767b\u5f55\u7684\u3002\u5f53\u7136\uff0c\u65b0\u521b\u5efa\u7684\u7528\u6237\u5982\u679c\u4e0d\u8bbe\u5b9a\u5bc6\u7801\uff0c\u90a3\u4e48\u5b83\u7684\u5bc6\u7801\u9879\u4e5f\u662f \"!!\"\uff0c\u4ee3\u8868\u8fd9\u4e2a\u7528\u6237\u6ca1\u6709\u5bc6\u7801\uff0c\u4e0d\u80fd\u767b\u5f55\u3002<\/p>\n
\u6700\u540e\u4e00\u6b21\u4fee\u6539\u65f6\u95f4<\/strong><\/span><\/div>\n\u6b64\u5b57\u6bb5\u8868\u793a\u6700\u540e\u4e00\u6b21\u4fee\u6539\u5bc6\u7801\u7684\u65f6\u95f4\uff0c\u53ef\u662f\uff0c\u4e3a\u4ec0\u4e48 root \u7528\u6237\u663e\u793a\u7684\u662f 15775 \u5462\uff1f<\/p>\n
\u8fd9\u662f\u56e0\u4e3a\uff0cLinux \u8ba1\u7b97\u65e5\u671f\u7684\u65f6\u95f4\u662f\u4ee5\u00a0 1970 \u5e74 1 \u6708 1 \u65e5\u4f5c\u4e3a 1 \u4e0d\u65ad\u7d2f\u52a0\u5f97\u5230\u7684\u65f6\u95f4\uff0c\u5230 1971 \u5e74 1 \u6708 1 \u65e5\uff0c\u5219\u4e3a 366 \u5929\u3002\u8fd9\u91cc\u663e\u793a 15775 \u5929\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6b64 root \u8d26\u53f7\u5728 1970 \u5e74 1 \u6708 1 \u65e5\u4e4b\u540e\u7684\u7b2c 15775 \u5929\u4fee\u6539\u7684 root \u7528\u6237\u5bc6\u7801\u3002<\/p>\n
\u90a3\u4e48\uff0c\u5230\u5e95 15775 \u4ee3\u8868\u7684\u662f\u54ea\u4e00\u5929\u5462\uff1f\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u6362\u7b97\uff1a<\/p>\n
[root@localhost ~]# date -d \"1970-01-01 15775 days\"
\n2013\u5e7403\u670811\u65e5 \u661f\u671f\u4e00 00:00:00 CST<\/p>\n
\u53ef\u4ee5\u770b\u5230\uff0c\u901a\u8fc7\u4ee5\u4e0a\u547d\u4ee4\uff0c\u5373\u53ef\u5c06\u5176\u6362\u7b97\u4e3a\u6211\u4eec\u4e60\u60ef\u7684\u7cfb\u7edf\u65e5\u671f\u3002<\/p>\n
\u6700\u5c0f\u4fee\u6539\u65f6\u95f4\u95f4\u9694<\/strong><\/span><\/div>\n\u6700\u5c0f\u4fee\u6539\u95f4\u9694\u65f6\u95f4\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u8be5\u5b57\u6bb5\u89c4\u5b9a\u4e86\u4ece\u7b2c 3 \u5b57\u6bb5\uff08\u6700\u540e\u4e00\u6b21\u4fee\u6539\u5bc6\u7801\u7684\u65e5\u671f\uff09\u8d77\uff0c\u591a\u957f\u65f6\u95f4\u4e4b\u5185\u4e0d\u80fd\u4fee\u6539\u5bc6\u7801\u3002\u5982\u679c\u662f 0\uff0c\u5219\u5bc6\u7801\u53ef\u4ee5\u968f\u65f6\u4fee\u6539\uff1b\u5982\u679c\u662f 10\uff0c\u5219\u4ee3\u8868\u5bc6\u7801\u4fee\u6539\u540e 10 \u5929\u4e4b\u5185\u4e0d\u80fd\u518d\u6b21\u4fee\u6539\u5bc6\u7801\u3002<\/p>\n
\u6b64\u5b57\u6bb5\u662f\u4e3a\u4e86\u9488\u5bf9\u67d0\u4e9b\u4eba\u9891\u7e41\u66f4\u6539\u8d26\u6237\u5bc6\u7801\u800c\u8bbe\u8ba1\u7684\u3002<\/p>\n
\u5bc6\u7801\u6709\u6548\u671f<\/strong><\/span><\/div>\n\u7ecf\u5e38\u53d8\u66f4\u5bc6\u7801\u662f\u4e2a\u597d\u4e60\u60ef\uff0c\u4e3a\u4e86\u5f3a\u5236\u8981\u6c42\u7528\u6237\u53d8\u66f4\u5bc6\u7801\uff0c\u8fd9\u4e2a\u5b57\u6bb5\u53ef\u4ee5\u6307\u5b9a\u8ddd\u79bb\u7b2c 3 \u5b57\u6bb5\uff08\u6700\u540e\u4e00\u6b21\u66f4\u6539\u5bc6\u7801\uff09\u591a\u957f\u65f6\u95f4\u5185\u9700\u8981\u518d\u6b21\u53d8\u66f4\u5bc6\u7801\uff0c\u5426\u5219\u8be5\u8d26\u6237\u5bc6\u7801\u8fdb\u884c\u8fc7\u671f\u9636\u6bb5\u3002
\n\u8be5\u5b57\u6bb5\u7684\u9ed8\u8ba4\u503c\u4e3a 99999\uff0c\u4e5f\u5c31\u662f 273 \u5e74\uff0c\u53ef\u8ba4\u4e3a\u662f\u6c38\u4e45\u751f\u6548\u3002\u5982\u679c\u6539\u4e3a 90\uff0c\u5219\u8868\u793a\u5bc6\u7801\u88ab\u4fee\u6539 90 \u5929\u4e4b\u540e\u5fc5\u987b\u518d\u6b21\u4fee\u6539\uff0c\u5426\u5219\u8be5\u7528\u6237\u5373\u5c06\u8fc7\u671f\u3002\u7ba1\u7406\u670d\u52a1\u5668\u65f6\uff0c\u901a\u8fc7\u8fd9\u4e2a\u5b57\u6bb5\u5f3a\u5236\u7528\u6237\u5b9a\u671f\u4fee\u6539\u5bc6\u7801\u3002<\/p>\n
\u5bc6\u7801\u9700\u8981\u53d8\u66f4\u524d\u7684\u8b66\u544a\u5929\u6570<\/strong><\/span><\/div>\n\u4e0e\u7b2c 5 \u5b57\u6bb5\u76f8\u6bd4\u8f83\uff0c\u5f53\u8d26\u6237\u5bc6\u7801\u6709\u6548\u671f\u5feb\u5230\u65f6\uff0c\u7cfb\u7edf\u4f1a\u53d1\u51fa\u8b66\u544a\u4fe1\u606f\u7ed9\u6b64\u8d26\u6237\uff0c\u63d0\u9192\u7528\u6237 \"\u518d\u8fc7 n \u5929\u4f60\u7684\u5bc6\u7801\u5c31\u8981\u8fc7\u671f\u4e86\uff0c\u8bf7\u5c3d\u5feb\u91cd\u65b0\u8bbe\u7f6e\u4f60\u7684\u5bc6\u7801\uff01\"\u3002<\/p>\n
\u8be5\u5b57\u6bb5\u7684\u9ed8\u8ba4\u503c\u662f 7\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u8ddd\u79bb\u5bc6\u7801\u6709\u6548\u671f\u7684\u7b2c 7 \u5929\u5f00\u59cb\uff0c\u6bcf\u6b21\u767b\u5f55\u7cfb\u7edf\u90fd\u4f1a\u5411\u8be5\u8d26\u6237\u53d1\u51fa \"\u4fee\u6539\u5bc6\u7801\" \u7684\u8b66\u544a\u4fe1\u606f\u3002<\/p>\n
\u5bc6\u7801\u8fc7\u671f\u540e\u7684\u5bbd\u9650\u5929\u6570<\/strong><\/span><\/div>\n\u4e5f\u79f0\u4e3a\u201c\u53e3\u4ee4\u5931\u6548\u65e5\u201d\uff0c\u7b80\u5355\u7406\u89e3\u5c31\u662f\uff0c\u5728\u5bc6\u7801\u8fc7\u671f\u540e\uff0c\u7528\u6237\u5982\u679c\u8fd8\u662f\u6ca1\u6709\u4fee\u6539\u5bc6\u7801\uff0c\u5219\u5728\u6b64\u5b57\u6bb5\u89c4\u5b9a\u7684\u5bbd\u9650\u5929\u6570\u5185\uff0c\u7528\u6237\u8fd8\u662f\u53ef\u4ee5\u767b\u5f55\u7cfb\u7edf\u7684\uff1b\u5982\u679c\u8fc7\u4e86\u5bbd\u9650\u5929\u6570\uff0c\u7cfb\u7edf\u5c06\u4e0d\u518d\u8ba9\u6b64\u8d26\u6237\u767b\u9646\uff0c\u4e5f\u4e0d\u4f1a\u63d0\u793a\u8d26\u6237\u8fc7\u671f\uff0c\u662f\u5b8c\u5168\u7981\u7528\u3002<\/p>\n
\u6bd4\u5982\u8bf4\uff0c\u6b64\u5b57\u6bb5\u89c4\u5b9a\u7684\u5bbd\u9650\u5929\u6570\u662f 10\uff0c\u5219\u4ee3\u8868\u5bc6\u7801\u8fc7\u671f 10 \u5929\u540e\u5931\u6548\uff1b\u5982\u679c\u662f 0\uff0c\u5219\u4ee3\u8868\u5bc6\u7801\u8fc7\u671f\u540e\u7acb\u5373\u5931\u6548\uff1b\u5982\u679c\u662f -1\uff0c\u5219\u4ee3\u8868\u5bc6\u7801\u6c38\u8fdc\u4e0d\u4f1a\u5931\u6548\u3002<\/p>\n
\u8d26\u53f7\u5931\u6548\u65f6\u95f4<\/strong><\/span><\/div>\n\u540c\u7b2c 3 \u4e2a\u5b57\u6bb5\u4e00\u6837\uff0c\u4f7f\u7528\u81ea\u00a0 1970 \u5e74 1 \u6708 1 \u65e5\u4ee5\u6765\u7684\u603b\u5929\u6570\u4f5c\u4e3a\u8d26\u6237\u7684\u5931\u6548\u65f6\u95f4\u3002\u8be5\u5b57\u6bb5\u8868\u793a\uff0c\u8d26\u53f7\u5728\u6b64\u5b57\u6bb5\u89c4\u5b9a\u7684\u65f6\u95f4\u4e4b\u5916\uff0c\u4e0d\u8bba\u4f60\u7684\u5bc6\u7801\u662f\u5426\u8fc7\u671f\uff0c\u90fd\u5c06\u65e0\u6cd5\u4f7f\u7528\uff01<\/p>\n
\u8be5\u5b57\u6bb5\u901a\u5e38\u88ab\u4f7f\u7528\u5728\u5177\u6709\u6536\u8d39\u670d\u52a1\u7684\u7cfb\u7edf\u4e2d\u3002<\/p>\n
\u4fdd\u7559<\/strong><\/span><\/div>\n\u8fd9\u4e2a\u5b57\u6bb5\u76ee\u524d\u6ca1\u6709\u4f7f\u7528\uff0c\u7b49\u5f85\u65b0\u529f\u80fd\u7684\u52a0\u5165\u3002<\/p>\n
\u5fd8\u8bb0\u5bc6\u7801\u600e\u4e48\u529e<\/strong><\/span><\/div>\n\u7ecf\u5e38\u6709\u8bfb\u8005\u4f1a\u5fd8\u8bb0\u81ea\u5df1\u7684\u8d26\u6237\u5bc6\u7801\uff0c\u8be5\u600e\u4e48\u5904\u7406\u5462\uff1f<\/p>\n
\u5bf9\u4e8e\u666e\u901a\u8d26\u6237\u7684\u5bc6\u7801\u9057\u5931\uff0c\u53ef\u4ee5\u901a\u8fc7 root \u8d26\u6237\u89e3\u51b3\uff0c\u5b83\u4f1a\u91cd\u65b0\u7ed9\u4f60\u914d\u7f6e\u597d\u6307\u5b9a\u8d26\u6237\u7684\u5bc6\u7801\uff0c\u800c\u4e0d\u9700\u77e5\u9053\u4f60\u539f\u6709\u7684\u5bc6\u7801\uff08\u5229\u7528 root \u7684\u8eab\u4efd\u4f7f\u7528 passwd \u547d\u4ee4\u5373\u53ef\uff09\u3002<\/p>\n
\u5982\u679c root \u8d26\u53f7\u7684\u5bc6\u7801\u9057\u5931\uff0c\u5219\u9700\u8981\u91cd\u65b0\u542f\u52a8\u8fdb\u5165\u5355\u7528\u6237\u6a21\u5f0f\uff0c\u7cfb\u7edf\u4f1a\u63d0\u4f9b root \u6743\u9650\u7684 bash \u63a5\u53e3\uff0c\u6b64\u65f6\u53ef\u4ee5\u7528 passwd \u547d\u4ee4\u4fee\u6539\u8d26\u6237\u5bc6\u7801\uff1b\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6302\u8f7d\u6839\u76ee\u5f55\uff0c\u4fee\u6539 \/etc\/shadow\uff0c\u5c06\u8d26\u6237\u7684 root \u5bc6\u7801\u6e05\u7a7a\u7684\u65b9\u6cd5\uff0c\u6b64\u65b9\u5f0f\u53ef\u4f7f\u7528 root \u65e0\u6cd5\u5bc6\u7801\u5373\u53ef\u767b\u9646\uff0c\u5efa\u8bae\u767b\u9646\u540e\u4f7f\u7528 passwd \u547d\u4ee4\u914d\u7f6e root \u5bc6\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u524d\u9762\u4ecb\u7ecd\u4e86 \/etc\/passwd \u6587\u4ef6\uff0c\u7531\u4e8e\u8be5\u6587\u4ef6\u5141\u8bb8\u6240\u6709\u7528\u6237\u8bfb\u53d6\uff0c\u6613\u5bfc\u81f4\u7528\u6237\u5bc6\u7801\u6cc4\u9732\uff0c\u56e0\u6b64 Linux \u7cfb […]<\/p>\n","protected":false},"author":643,"featured_media":176236,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-176229","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=176229"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176229\/revisions"}],"predecessor-version":[{"id":176237,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176229\/revisions\/176237"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/176236"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=176229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=176229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=176229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}