{"id":5964,"date":"2019-12-16T16:56:25","date_gmt":"2019-12-16T08:56:25","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=5964"},"modified":"2019-12-27T16:40:24","modified_gmt":"2019-12-27T08:40:24","slug":"pwconv","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/pwconv","title":{"rendered":"pwconv\u547d\u4ee4 – \u5f00\u542f\u7528\u6237\u7684\u6295\u5f71\u5bc6\u7801"},"content":{"rendered":"\n

pwconv\u547d\u4ee4\u7528\u6765\u5f00\u542f\u7528\u6237\u7684\u6295\u5f71\u5bc6\u7801\u3002Linux\u7cfb\u7edf\u91cc\u7684\u7528\u6237\u548c\u7fa4\u7ec4\u5bc6\u7801\uff0c\u5206\u522b\u5b58\u653e\u5728\u540d\u79f0\u4e3apasswd\u548cgroup\u7684\u6587\u4ef6\u4e2d\uff0c \u8fd9\u4e24\u4e2a\u6587\u4ef6\u4f4d\u4e8e\/etc\u76ee\u5f55\u4e0b\u3002\u56e0\u7cfb\u7edf\u8fd0\u4f5c\u6240\u9700\uff0c\u4efb\u4f55\u4eba\u90fd\u5f97\u4ee5\u8bfb\u53d6\u5b83\u4eec\uff0c\u9020\u6210\u5b89\u5168\u4e0a\u7684\u7834\u7efd\u3002\u6295\u5f71\u5bc6\u7801\u5c06\u6587\u4ef6\u5185\u7684\u5bc6\u7801\u6539\u5b58\u5728\/etc\u76ee\u5f55\u4e0b\u7684shadow\u548cgshadow\u6587\u4ef6\u5185\uff0c\u53ea\u5141\u8bb8\u7cfb\u7edf\u7ba1\u7406\u8005\u8bfb\u53d6\uff0c\u540c\u65f6\u628a\u539f\u5bc6\u7801\u7f6e\u6362\u4e3a\u201dx\u201d\u5b57\u7b26\uff0c\u6709\u6548\u7684\u5f3a\u5316\u4e86\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002 <\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f: \u00a0<\/strong>pwconv [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570:<\/strong><\/p>\n\n\n\n

-h<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr>
-R<\/td>\u5728chroot_dir\u76ee\u5f55\u4e2d\u5e94\u7528\u66f4\u6539\u5e76\u4f7f\u7528\u6765\u81eachroot_dir\u76ee\u5f55\u7684\u6587\u4ef6\u914d\u7f6e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong> <\/p>\n\n\n\n

\u5f00\u542f\u7528\u6237\u7684\u6295\u5f71\u5bc6\u7801:<\/p>\n\n\n\n

[root@linuxcool ~]# pwconv<\/pre>\n\n\n\n

\u67e5\u770b\u5df2\u7ecf\u5f00\u542f\u6295\u5f71\u5bc6\u7801\u7684\u7528\u6237linuxcool:<\/p>\n\n\n\n

[root@linuxcool ~]# cat \/etc\/passwd | grep linuxcool\nlinuxcool:x:3001:3001::\/home\/linuxcool:\/bin\/sh<\/pre>\n","protected":false},"excerpt":{"rendered":"

pwconv\u547d\u4ee4\u7528\u6765\u5f00\u542f\u7528\u6237\u7684\u6295\u5f71\u5bc6\u7801\u3002Linux\u7cfb\u7edf\u91cc\u7684\u7528\u6237\u548c\u7fa4\u7ec4\u5bc6\u7801\uff0c\u5206\u522b\u5b58\u653e\u5728\u540d\u79f0\u4e3apasswd\u548cgro […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5964"}],"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=5964"}],"version-history":[{"count":16,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5964\/revisions"}],"predecessor-version":[{"id":6182,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5964\/revisions\/6182"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=5964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=5964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=5964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}