{"id":8467,"date":"2020-07-28T22:41:37","date_gmt":"2020-07-28T14:41:37","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8467"},"modified":"2020-07-28T22:41:38","modified_gmt":"2020-07-28T14:41:38","slug":"lslogins","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lslogins","title":{"rendered":"lslogins\u547d\u4ee4 – \u663e\u793a\u7cfb\u7edf\u4e2d\u73b0\u6709\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f"},"content":{"rendered":"\n
lslogins\u547d\u4ee4\u4f1a\u5c55\u793a\u51fa\u7cfb\u7edf\u4e2d\u73b0\u6709\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f\uff0c-u\u6807\u8bb0\u53ef\u7528\u6765\u6807\u8bc6\u53ea\u5c55\u793a\u7528\u6237\u7684\u8d26\u6237\u3002<\/p>\n\n\n\n
\u8be5\u547d\u4ee4\u68c0\u67e5wtmp\u548cbtmp\u65e5\u5fd7\uff0c\/etc\/shadow\uff08\u5982\u679c\u9700\u8981\uff09\u548c \/etc\/passwd\u5e76\u8f93\u51fa\u6240\u9700\u6570\u636e\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>lslogins [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5c55\u793a\u51fa\u7cfb\u7edf\u4e2d\u73b0\u6709\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f\uff1a<\/p>\n\n\n\n \u663e\u793a\u4e0e\u6309\u5bc6\u7801\u767b\u5f55\u76f8\u5173\u7684\u4fe1\u606f\uff1a<\/p>\n\n\n\n \u663e\u793a\u6709\u5173\u8865\u5145\u7ec4\u7684\u4fe1\u606f\uff1a<\/p>\n\n\n\n lslogins\u547d\u4ee4\u4f1a\u5c55\u793a\u51fa\u7cfb\u7edf\u4e2d\u73b0\u6709\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f\uff0c-u\u6807\u8bb0\u53ef\u7528\u6765\u6807\u8bc6\u53ea\u5c55\u793a\u7528\u6237\u7684\u8d26\u6237\u3002 \u8be5\u547d\u4ee4\u68c0\u67e5wtmp […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8467"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8467"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8467\/revisions"}],"predecessor-version":[{"id":8473,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8467\/revisions\/8473"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-a, --acc-expiration<\/td> \u663e\u793a\u6709\u5173\u4e0a\u6b21\u5bc6\u7801\u66f4\u6539\u65e5\u671f\u548c\u8d26\u6237\u5230\u671f\u65e5<\/td><\/tr> --btmp-file<\/td> btmp\u7684\u5907\u7528\u8def\u5f84<\/td><\/tr> -c, --colon-separate<\/td> \u7528\u5192\u53f7\u4ee3\u66ff\u6362\u884c\u7b26<\/td><\/tr> -e, --export<\/td> \u4ee5NAME=VALUE\u683c\u5f0f\u8f93\u51fa\u6570\u636e<\/td><\/tr> -f, --failed<\/td> \u663e\u793a\u6709\u5173\u7528\u6237\u4e0a\u6b21\u5931\u8d25\u767b\u5f55\u5c1d\u8bd5\u7684\u6570\u636e<\/td><\/tr> -G, --supp-groups<\/td> \u663e\u793a\u6709\u5173\u8865\u5145\u7ec4\u7684\u4fe1\u606f<\/td><\/tr> -L, --last<\/td> \u663e\u793a\u5305\u542b\u6709\u5173\u7528\u6237\u4e0a\u6b21\u767b\u5f55\u4f1a\u8bdd\u7684\u4fe1\u606f\u7684\u6570\u636e<\/td><\/tr> -l, --logins<\/td> \u4ec5\u663e\u793a\u767b\u5f55\u540d\uff08\u7528\u6237\uff09\u4e2d\u6307\u5b9a\u767b\u5f55\u540d\u7684\u7528\u6237\u7684\u6570\u636e\u540d\u79f0\u6216\u7528\u6237\u540d\uff09<\/td><\/tr> -o, --output<\/td> \u6307\u5b9a\u8981\u6253\u5370\u7684\u8f93\u51fa\u5217<\/td><\/tr> -p, --pwd<\/td> \u663e\u793a\u4e0e\u6309\u5bc6\u7801\u767b\u5f55\u76f8\u5173\u7684\u4fe1\u606f<\/td><\/tr> -r, --raw<\/td> \u539f\u59cb\u8f93\u51fa\uff08\u65e0\u5217\uff09<\/td><\/tr> -u, --user-accs<\/td> \u663e\u793a\u7528\u6237\u5e10\u6237<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# lslogins -u linuxcool<\/pre>\n\n\n\n
[root@linuxcool ~]# lslogins -u linuxcool -p<\/pre>\n\n\n\n
[root@linuxcool ~]# lslogins -u linuxcool -G<\/pre>\n","protected":false},"excerpt":{"rendered":"