{"id":267283,"date":"2023-03-20T06:03:19","date_gmt":"2023-03-19T22:03:19","guid":{"rendered":"https:\/\/lrxjmw.cn\/qszwlxtrzzkj.html"},"modified":"2023-03-20T06:03:19","modified_gmt":"2023-03-19T22:03:19","slug":"qszwlxtrzzkj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/qszwlxtrzzkj.html","title":{"rendered":"\u8f7b\u677e\u638c\u63e1Linux\u7cfb\u7edf\u65e5\u5fd7\u67e5\u770b\u6280\u5de7\uff0c\u5feb\u901f\u627e\u5230\u95ee\u9898\u6e90\uff01"},"content":{"rendered":"

Linux<\/a>\u7cfb\u7edf<\/a>\u4f5c\u4e3a\u4e00\u79cd\u5f00\u6e90\u514d\u8d39\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u670d\u52a1\u5668\u3001\u5d4c\u5165\u5f0f\u8bbe\u5907\u7b49\u9886\u57df\u3002\u5728\u4f7f\u7528Linux\u7cfb\u7edf\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\u4ee5\u4e86\u89e3\u7cfb\u7edf\u7684\u8fd0\u884c\u60c5\u51b5linux\u7cfb\u7edf\u4e0b\u8f7d\uff0c\u6392\u67e5\u95ee\u9898\u7b49\u3002\u672c\u6587\u5c06\u4e3a\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u67e5\u770bLinux\u7cfb\u7edf\u7684\u5404\u7c7b\u65e5\u5fd7\u6587\u4ef6\u3002<\/p>\n

\u4e00\u3001\u767b\u5f55\u65e5\u5fd7<\/p>\n

\u767b\u5f55\u65e5\u5fd7\u8bb0\u5f55\u4e86\u6240\u6709\u7528\u6237\u767b\u5f55\u548c\u6ce8\u9500\u7684\u4fe1\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u767b\u5f55\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/wtmp\u6587\u4ef6\u4e2d\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528last\u547d\u4ee4<\/a>\u6765\u67e5\u770b\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a<\/p>\n

\n

\nlast\n<\/pre>\n<\/p>\n

\u8be5\u547d\u4ee4\u4f1a\u5217\u51fa\u6240\u6709\u7528\u6237\u7684\u767b\u5f55\u548c\u6ce8\u9500\u8bb0\u5f55\u4ee5\u53ca\u76f8\u5173\u7684\u65f6\u95f4\u3001IP\u5730\u5740\u7b49\u4fe1\u606f\u3002\u5982\u679c\u9700\u8981\u663e\u793a\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528last -f\/var\/log\/wtmp\u547d\u4ee4\u3002<\/p>\n

\u4e8c\u3001\u5185\u6838\u65e5\u5fd7<\/p>\n

\u5185\u6838\u65e5\u5fd7\u5305\u542b\u4e86\u7cfb\u7edf\u5185\u6838\u8fd0\u884c\u65f6\u7684\u5404\u79cd\u4fe1\u606f\u548c\u9519\u8bef\u6d88\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5185\u6838\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/kern.log\u6587\u4ef6\u4e2d\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dmesg\u547d\u4ee4\u6765\u67e5\u770b\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a<\/p>\n

\n

\ndmesg\n<\/pre>\n<\/p>\n

\u8be5\u547d\u4ee4\u4f1a\u5217\u51fa\u5185\u6838\u542f\u52a8\u540e\u6240\u6709\u7684\u6d88\u606f\u548c\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n

\u4e09\u3001\u7528\u6237\u64cd\u4f5c\u65e5\u5fd7<\/p>\n

\u7528\u6237\u64cd\u4f5c\u65e5\u5fd7\u8bb0\u5f55\u4e86\u6240\u6709\u7528\u6237\u6267\u884c\u7684\u547d\u4ee4\u548c\u76f8\u5173\u4fe1\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2dlinux\u7cfb\u7edf\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7<\/strong>\uff0c\u7528\u6237\u64cd\u4f5c\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/auth.log\u6216\/var\/log\/secure\u6587\u4ef6\u4e2d\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528cat\u6216\u8005less\u547d\u4ee4\u6765\u67e5\u770b\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a<\/p>\n

\n

\ncat \/var\/log\/auth.log\n<\/pre>\n<\/p>\n

\u8be5\u547d\u4ee4\u4f1a\u5217\u51faauth.log\u6587\u4ef6\u4e2d\u6240\u6709\u7684\u7528\u6237\u64cd\u4f5c\u8bb0\u5f55\u3002<\/p>\n

\u56db\u3001\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7<\/p>\n

\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4ea7\u751f\u7684\u5404\u79cd\u4fe1\u606f\u548c\u9519\u8bef\u6d88\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2dlinux\u7cfb\u7edf\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7<\/strong>\uff0c\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\u76ee\u5f55\u4e0b\u5bf9\u5e94\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0\u7684\u6587\u4ef6\u4e2d\u3002\u4f8b\u5982Apache\u670d\u52a1\u5668\u4ea7\u751f\u7684\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/apache2\u76ee\u5f55\u4e0b\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528tail\u547d\u4ee4\u6765\u5b9e\u65f6\u76d1\u63a7\u5e94\u7528\u7a0b\u5e8f\u4ea7\u751f\u7684\u65e5\u5fd7\u6d88\u606f\uff0c\u4f8b\u5982\uff1a<\/p>\n

\n

\ntail -f\/var\/log\/apache2\/access.log\n<\/pre>\n<\/p>\n

\u8be5\u547d\u4ee4\u4f1a\u5b9e\u65f6\u76d1\u63a7access.log\u6587\u4ef6\uff0c\u5e76\u8f93\u51fa\u65b0\u4ea7\u751f\u7684\u6d88\u606f\u3002<\/p>\n

\u4e94\u3001\u90ae\u4ef6\u670d\u52a1\u65e5\u5fd7<\/p>\n

\u90ae\u4ef6\u670d\u52a1\u65e5\u5fd7\u5305\u542b\u4e86\u90ae\u4ef6\u670d\u52a1\u5668\u8fd0\u884c\u65f6\u4ea7\u751f\u7684\u5404\u79cd\u4fe1\u606f\u548c\u9519\u8bef\u6d88\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u90ae\u4ef6\u670d\u52a1\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/maillog\u6216\u8005\/var\/log\/mail.log\u6587\u4ef6\u4e2d\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528cat\u6216\u8005less\u547d\u4ee4\u6765\u67e5\u770b\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u4f8b\u5982\uff1a<\/p>\n

\n

\ncat \/var\/log\/maillog\n<\/pre>\n<\/p>\n

\u8be5\u547d\u4ee4\u4f1a\u5217\u51famaillog\u6587\u4ef6\u4e2d\u6240\u6709\u90ae\u4ef6\u670d\u52a1\u5668\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n

\u516d\u3001\u5b89\u5168\u5ba1\u8ba1\u65e5\u5fd7<\/p>\n

\u5b89\u5168\u5ba1\u8ba1\u65e5\u5fd7\u5305\u542b\u4e86\u4e0e\u5b89\u5168\u6709\u5173\u7684\u5404\u79cd\u4fe1\u606f\u548c\u9519\u8bef\u6d88\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5b89\u5168\u5ba1\u8ba1\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\/audit\/audit.log\u6587\u4ef6\u4e2d\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528ausearch\u6216\u8005aureport\u5de5\u5177\u6765\u67e5\u8be2\u548c\u5206\u6790\u8be5\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n

\u4e03\u3001\u7cfb\u7edf\u670d\u52a1\u72b6\u6001\u65e5\u5fd7<\/p>\n

\u7cfb\u7edf\u670d\u52a1\u72b6\u6001\u65e5\u5fd7\u5305\u542b\u4e86\u5404\u4e2a\u670d\u52a1\u542f\u52a8\u548c\u505c\u6b62\u65f6\u4ea7\u751f\u7684\u5404\u79cd\u4fe1\u606f\u548c\u9519\u8bef\u6d88\u606f\u3002\u5728Linux\u7cfb\u7edf\u4e2d\u7f8e\u56fdlinux\u4e3b\u673a\uff0c\u670d\u52a1\u72b6\u6001\u65e5\u5fd7\u901a\u5e38\u5b58\u50a8\u5728\/var\/log\u76ee\u5f55\u4e0b\u5bf9\u5e94\u670d\u52a1\u540d\u79f0\u7684\u6587\u4ef6\u4e2d\uff08\u5982syslog, messages\uff09\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528cat\u6216\u8005less\u547d\u4ee4\u6765\u67e5\u770b\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u3002<\/p>\n

\u516b\u3001\u5176\u4ed6\u7c7b\u578b\u65e5\u5fd7<\/p>\n

\u9664\u4e86\u4e0a\u8ff0\u7c7b\u578b\u5916\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u7c7b\u578b\u7684\u65e5\u5fd7\u53ef\u4f9b\u67e5\u8be2\u548c\u5206\u6790\u3002\u5982Samba\u670d\u52a1\u5668\u4ea7\u751f\u7684smbd.log, ntpd\u4ea7\u751f\u7684ntp.log\u7b49\u7b49\u3002<\/p>\n

\u603b\u7ed3\uff1a\u901a\u8fc7\u672c\u6587\u4ecb\u7ecd\uff0c\u6211\u4eec\u8be6\u7ec6\u4e86\u89e3\u4e86\u5982\u4f55\u67e5\u770bLinux\u7cfb\u7edf\u4e0d\u540c\u7c7b\u578b\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u5b66\u4e60\u4e86\u76f8\u5e94\u5de5\u5177\u53ca\u547d\u4ee4\u884c\u64cd\u4f5c\u65b9\u6cd5\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u80fd\u5c06\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u548c\u7ef4\u62a4Linux\u670d\u52a1\u5668\uff0c\u5e76\u5feb\u901f\u89e3\u51b3\u95ee\u9898\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u4f7f\u7528Linux\u7cfb\u7edf\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\u4ee5\u4e86\u89e3\u7cfb\u7edf\u7684\u8fd0\u884c\u60c5\u51b5\uff0c\u6392\u67e5\u95ee\u9898\u7b49\u3002\u9664\u4e86\u4e0a\u8ff0\u7c7b\u578b\u5916\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u7c7b\u578b\u7684\u65e5\u5fd7\u53ef\u4f9b\u67e5\u8be2\u548c\u5206\u6790\u3002\u603b\u7ed3\uff1a\u901a\u8fc7\u672c\u6587\u4ecb\u7ecd\uff0c\u6211\u4eec\u8be6\u7ec6\u4e86\u89e3\u4e86\u5982\u4f55\u67e5\u770bLinux\u7cfb\u7edf\u4e0d\u540c\u7c7b\u578b\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u5b66\u4e60\u4e86\u76f8\u5e94\u5de5\u5177\u53ca\u547d\u4ee4\u884c\u64cd\u4f5c\u65b9\u6cd5\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u80fd\u5c06\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u548c\u7ef4\u62a4Linux\u670d\u52a1\u5668\uff0c\u5e76\u5feb\u901f\u89e3\u51b3\u95ee\u9898\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-267283","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=267283"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267283\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=267283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=267283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=267283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}