{"id":5459,"date":"2020-12-02T00:16:08","date_gmt":"2020-12-01T16:16:08","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5459"},"modified":"2020-12-02T00:16:08","modified_gmt":"2020-12-01T16:16:08","slug":"linux%e4%b8%ad%e4%bf%ae%e6%94%b9%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81%e6%8a%a5%e9%94%99-passwd%ef%bc%9aauthentication-token-manipulation-error","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5459","title":{"rendered":"linux\u4e2d\u4fee\u6539\u7528\u6237\u5bc6\u7801\u62a5\u9519 passwd\uff1aAuthentication token manipulation error"},"content":{"rendered":"<p>\u51fa\u73b0\u201cpasswd\uff1aAuthentication token manipulation error\u201d\u8fd9\u79cd\u95ee\u9898\u9700\u8981\u8003\u8651\u4ee5\u4e0b\u60c5\u51b5\uff1a<br \/>\n1\u3001\u9519\u8bef\u51fa\u73b0\u5728\u8f93\u5165\u5b8c\u65b0\u5bc6\u7801\u540e<br \/>\n\u95ee\u9898\uff1a\/etc\/passwd, \/etc\/shadow\u6587\u4ef6\u88ab\u9501\u4f4f\uff0c\u4e0d\u5141\u8bb8\u4fee\u6539\u3002<\/p>\n<pre>[root@weijing ]# lsattr \/etc\/passwd\n----i-------- \/etc\/passwd\n[root@weijing ]# lsattr \/etc\/shadow\n----i-------- \/etc\/shadow\n[root@weijing ]# passwd weijing\nChanging password for user weijing.\nNew UNIX password:\nBAD PASSWORD: it is based on a dictionary word\nRetype new UNIX password:\npasswd: Authentication token manipulation error<\/pre>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<pre>[root@weijing ]# chattr -i \/etc\/shadow\n[root@weijing ]# chattr -i \/etc\/passwd\n[root@weijing ]# lsattr \/etc\/passwd\n------------- \/etc\/passwd\n[root@weijing ]# lsattr \/etc\/shadow\n------------- \/etc\/shadow<\/pre>\n<p>2\u3001\u7cfb\u7edf\u78c1\u76d8\u6216\u8005inode 100%\u6ee1\u4e86\uff0c\u5bfc\u81f4\u4fee\u6539\u7528\u6237\u62a5\u9519\uff0c\u901a\u8fc7df -h\u53cadf -i\u67e5\u770b<br \/>\n3\u3001\u8f93\u5165\u5b8cpasswd\u540e\u7acb\u5373\u62a5\u9519<br \/>\n\u5e94\u8be5\u662f\/etc\/pam.d\/\u8ba4\u8bc1\u7684\u5730\u65b9\u51fa\u95ee\u9898\u4e86<\/p>\n<pre>[root@weijing ~]# passwd weijing\nChanging password for user weijing .\npasswd: Authentication token manipulation error\nYou have new mail in \/var\/spool\/mail\/root<\/pre>\n<p>\u6ce8\u91ca\u4e86password\uff1a<\/p>\n<pre>[root@weijing ~]# cat \/etc\/pam.d\/passwd\n#%PAM-1.0\nauth       required     pam_stack.so service=system-auth\naccount    required     pam_stack.so service=system-auth\n#password   required    pam_stack.so service=system-auth\n<\/pre>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<pre>[root@weijing ~]# cat \/etc\/pam.d\/passwd\n#%PAM-1.0\nauth       required     pam_stack.so service=system-auth\naccount    required     pam_stack.so service=system-auth\npassword   required    pam_stack.so service=system-auth\n<\/pre>\n<p>3\u3001\/etc\/pam.d\/system-auth \u6587\u4ef6\u5185\u5bb9\u88ab\u6e05\u7a7a\u3002<br \/>\n\u6dfb\u52a0\u5982\u4e0b\uff1a<\/p>\n<pre>[root@weijing ~]# cat \/etc\/pam.d\/system-auth\n#%PAM-1.0\n# This file is auto-generated.\n# User changes will be destroyed the next time authconfig is run.\nauth        required      \/lib\/security\/$ISA\/pam_env.so\nauth        sufficient    \/lib\/security\/$ISA\/pam_unix.so likeauth nullok\nauth        required      \/lib\/security\/$ISA\/pam_deny.so\naccount     required      \/lib\/security\/$ISA\/pam_unix.so\naccount     sufficient    \/lib\/security\/$ISA\/pam_succeed_if.so uid &lt; 100 quiet\naccount     required      \/lib\/security\/$ISA\/pam_permit.so\npassword    requisite     \/lib\/security\/$ISA\/pam_cracklib.so retry=3\npassword    sufficient    \/lib\/security\/$ISA\/pam_unix.so nullok use_authtok md5 shadow\npassword    required      \/lib\/security\/$ISA\/pam_deny.so\nsession     required      \/lib\/security\/$ISA\/pam_limits.so\nsession     required      \/lib\/security\/$ISA\/pam_unix.so<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u51fa\u73b0\u201cpasswd\uff1aAuthentication token manipulation error\u201d\u8fd9\u79cd\u95ee\u9898\u9700 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5459\"> <span class=\"screen-reader-text\">linux\u4e2d\u4fee\u6539\u7528\u6237\u5bc6\u7801\u62a5\u9519 passwd\uff1aAuthentication token manipulation error<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[102,124],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\u51fa\u73b0\u201cpasswd\uff1aAuthentication token manipulation error\u201d\u8fd9\u79cd\u95ee\u9898\u9700&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5459"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5459"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5459\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5459"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}