{"id":3166,"date":"2022-12-20T16:43:41","date_gmt":"2022-12-20T19:43:41","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/pwck-man8\/"},"modified":"2022-12-20T16:43:41","modified_gmt":"2022-12-20T19:43:41","slug":"pwck-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/pwck-man8\/","title":{"rendered":"PWCK (man8)"},"content":{"rendered":"<h1 align=\"center\">PWCK<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#CONFIGURATION\">CONFIGURATION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#EXIT VALUES\">EXIT VALUES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pwck \u2212 verify integrity of password files<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"52%\">\n<p style=\"margin-top: 1em\"><b>pwck<\/b> [options] [<i>passwd\u00a0<\/i>[\u00a0<i>shadow\u00a0<\/i>]]<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>pwck<\/b> command verifies the integrity of the users and authentication information. It checks that all entries in \/etc\/passwd and \/etc\/shadow have the proper format and contain valid data. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Checks are made to verify that each entry has:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 the correct number of fields<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 a unique and valid user name<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 a valid user and group identifier<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 a valid primary group<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 a valid home directory<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 a valid login shell<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">shadow checks are enabled when a second file parameter is specified or when \/etc\/shadow exists on the system.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">These checks are the following:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 every passwd entry has a matching shadow entry, and every shadow entry has a matching passwd entry<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 passwords are specified in the shadowed file<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 shadow entries have the correct number of fields<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 shadow entries are unique in shadow<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 the last password changes are not in the future<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The checks for correct number of fields and unique user name are fatal. If the entry has the wrong number of fields, the user will be prompted to delete the entire line. If the user does not answer affirmatively, all further checks are bypassed. An entry with a duplicated user name is prompted for deletion, but the remaining checks will still be made. All other errors are warning and the user is encouraged to run the <b>usermod<\/b> command to correct the error.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The commands which operate on the \/etc\/passwd file are not able to alter corrupted or duplicated entries. <b>pwck<\/b> should be used in those circumstances to remove the offending entry.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>\u2212r<\/b> and <b>\u2212s<\/b> options cannot be combined.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The options which apply to the <b>pwck<\/b> command are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:17%;\">Display help message and exit.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212q<\/b>, <b>\u2212\u2212quiet<\/b><\/p>\n<p style=\"margin-left:17%;\">Report errors only. The warnings which do not require any action from the user won&#8217;t be displayed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212r<\/b>, <b>\u2212\u2212read\u2212only<\/b><\/p>\n<p style=\"margin-left:17%;\">Execute the <b>pwck<\/b> command in read\u2212only mode.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212R<\/b>, <b>\u2212\u2212root\u00a0<\/b><i>CHROOT_DIR<\/i><\/p>\n<p style=\"margin-left:17%;\">Apply changes in the <i>CHROOT_DIR<\/i> directory and use the configuration files from the <i>CHROOT_DIR<\/i> directory.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212s<\/b>, <b>\u2212\u2212sort<\/b><\/p>\n<p style=\"margin-left:17%;\">Sort entries in \/etc\/passwd and \/etc\/shadow by UID.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">By default, <b>pwck<\/b> operates on the files \/etc\/passwd and \/etc\/shadow. The user may select alternate files with the <i>passwd<\/i> and <i>shadow<\/i> parameters.<\/p>\n<h2>CONFIGURATION <a name=\"CONFIGURATION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following configuration variables in \/etc\/login.defs change the behavior of this tool:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>PASS_MAX_DAYS<\/b> (number)<\/p>\n<p style=\"margin-left:17%;\">The maximum number of days a password may be used. If the password is older than this, a password change will be forced. If not specified, \u22121 will be assumed (which disables the restriction).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>PASS_MIN_DAYS<\/b> (number)<\/p>\n<p style=\"margin-left:17%;\">The minimum number of days allowed between password changes. Any password changes attempted sooner than this will be rejected. If not specified, \u22121 will be assumed (which disables the restriction).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>PASS_WARN_AGE<\/b> (number)<\/p>\n<p style=\"margin-left:17%;\">The number of days warning given before a password expires. A zero means warning is given only upon the day of expiration, a negative value means no warning is given. If not specified, no warning will be provided.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/group<\/p>\n<p style=\"margin-left:17%;\">Group account information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/passwd<\/p>\n<p style=\"margin-left:17%;\">User account information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/shadow<\/p>\n<p style=\"margin-left:17%;\">Secure user account information.<\/p>\n<h2>EXIT VALUES <a name=\"EXIT VALUES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>pwck<\/b> command exits with the following values:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>0<\/i><\/p>\n<p style=\"margin-left:17%;\">success<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>1<\/i><\/p>\n<p style=\"margin-left:17%;\">invalid command syntax<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>2<\/i><\/p>\n<p style=\"margin-left:17%;\">one or more bad password entries<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>3<\/i><\/p>\n<p style=\"margin-left:17%;\">can&#8217;t open password files<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>4<\/i><\/p>\n<p style=\"margin-left:17%;\">can&#8217;t lock password files<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>5<\/i><\/p>\n<p style=\"margin-left:17%;\">can&#8217;t update password files<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>6<\/i><\/p>\n<p style=\"margin-left:17%;\">can&#8217;t sort password files<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>group<\/b>(5), <b>grpck<\/b>(8), <b>passwd<\/b>(5), <b>shadow<\/b>(5), <b>usermod<\/b>(8).<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  pwck \u2212 verify integrity of password files <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,309],"class_list":["post-3166","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-pwck"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3166"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3166\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}