{"id":653,"date":"2015-04-10T19:06:33","date_gmt":"2015-04-10T19:06:33","guid":{"rendered":"http:\/\/vickistan.com\/?p=653"},"modified":"2015-04-10T19:08:11","modified_gmt":"2015-04-10T19:08:11","slug":"chage","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=653","title":{"rendered":"Chage"},"content":{"rendered":"<p>1) Set the password expiry date for username (*-M will update both \u201cPassword expires\u201d and \u201cMaximum number of days between password change\u201d):<\/p>\n<p><em>chage -M number-of-days username<\/em><\/p>\n<p>*If the password expiry date is reached and user doesn\u2019t change his password, the system will force him to change the password before the login is executed.<\/p>\n<p>2) Change the Account Expiry Date:<\/p>\n<p><em>chage -E &#8220;2009-11-31&#8221; username<\/em><\/p>\n<p>3) Force the user account to lock after 10 days:<\/p>\n<p><em>chage -I 10 username<\/em><\/p>\n<p>4) Turn off the password expiration for an user account, set the following:<\/p>\n<p>-m 0 will set the minimum number of days between password change to 0<br \/>\n-M 99999 will set the maximum number of days between password change to 99999<br \/>\n-I -1 (number minus one) will set the \u201cPassword inactive\u201d to never<br \/>\n-E -1 (number minus one) will set \u201cAccount expires\u201d to never.<\/p>\n<p><em>chage -m 0 -M 99999 -I -1 -E -1 username<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) Set the password expiry date for username (*-M will update both \u201cPassword expires\u201d and \u201cMaximum number of days between password change\u201d): chage -M number-of-days username *If the password expiry date is reached and user doesn\u2019t change his password, the &hellip; <a href=\"https:\/\/vickistan.com\/?p=653\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=653"}],"version-history":[{"count":2,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":656,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions\/656"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}