{"id":4705,"date":"2022-12-20T18:36:48","date_gmt":"2022-12-20T21:36:48","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/passwd-man5\/"},"modified":"2022-12-20T18:36:48","modified_gmt":"2022-12-20T21:36:48","slug":"passwd-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/passwd-man5\/","title":{"rendered":"PASSWD (man5)"},"content":{"rendered":"<h1 align=\"center\">PASSWD<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">passwd \u2212 password file<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>\/etc\/passwd<\/i> file is a text file that describes user login accounts for the system. It should have read permission allowed for all users (many utilities, like <b>ls<\/b>(1) use it to map user IDs to usernames), but write access only for the superuser.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In the good old days there was no great problem with this general read permission. Everybody could read the encrypted passwords, but the hardware was too slow to crack a well-chosen password, and moreover the basic assumption used to be that of a friendly user-community. These days many people run some version of the shadow password suite, where <i>\/etc\/passwd<\/i> has an &#8216;x&#8217; character in the password field, and the encrypted passwords are in <i>\/etc\/shadow<\/i>, which is readable by the superuser only.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the encrypted password, whether in <i>\/etc\/passwd<\/i> or in <i>\/etc\/shadow<\/i>, is an empty string, login is allowed without even asking for a password. Note that this functionality may be intentionally disabled in applications, or configurable (for example using the &#8220;nullok&#8221; or &#8220;nonull&#8221; arguments to pam_unix.so).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the encrypted password in <i>\/etc\/passwd<\/i> is &#8220;<i>*NP*<\/i>&#8221; (without the quotes), the shadow record should be obtained from an NIS+ server.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Regardless of whether shadow passwords are used, many system administrators use an asterisk (*) in the encrypted password field to make sure that this user can not authenticate themself using a password. (But see NOTES below.)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If you create a new login, first put an asterisk (*) in the password field, then use <b>passwd<\/b>(1) to set it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each line of the file describes a single user, and contains seven colon-separated fields:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">name:password:UID:GID:GECOS:directory:shell<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The field are as follows:<\/p>\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=\"12%\">\n<p><i>name<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"71%\">\n<p>This is the user\u2019s login name. It should not contain capital letters.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><i>password<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"71%\">\n<p>This is either the encrypted user password, an asterisk (*), or the letter &#8216;x&#8217;. (See <b>pwconv<\/b>(8) for an explanation of &#8216;x&#8217;.)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><i>UID<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"71%\">\n<p>The privileged <i>root<\/i> login account (superuser) has the user ID 0.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><i>GID<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"71%\">\n<p>This is the numeric primary group ID for this user. (Additional groups for the user are defined in the system group file; see <b>group<\/b>(5)).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><i>GECOS<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"71%\">\n<p>This field (sometimes called the &#8220;comment field&#8221;) is optional and used only for informational purposes. Usually, it contains the full username. Some programs (for example, <b>finger<\/b>(1)) display information from this field.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:29%; margin-top: 1em\">GECOS stands for &#8220;General Electric Comprehensive Operating System&#8221;, which was renamed to GCOS when GE\u2019s large systems division was sold to Honeywell. Dennis Ritchie has reported: &#8220;Sometimes we sent printer output or batch jobs to the GCOS machine. The gcos field in the password file was a place to stash the information for the $IDENTcard. Not elegant.&#8221;<\/p>\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=\"14%\">\n<p style=\"margin-top: 1em\"><i>directory<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"71%\">\n<p style=\"margin-top: 1em\">This is the user\u2019s home directory: the initial directory where the user is placed after logging in. The value in this field is used to set the <b>HOME<\/b> environment variable.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p><i>shell<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"71%\">\n<p>This is the program to run at login (if empty, use <i>\/bin\/sh<\/i>). If set to a nonexistent executable, the user will be unable to login through <b>login<\/b>(1). The value in this field is used to set the <b>SHELL<\/b> environment variable.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/passwd<\/i><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If you want to create user groups, there must be an entry in <i>\/etc\/group<\/i>, or no group will exist.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the encrypted password is set to an asterisk (*), the user will be unable to login using <b>login<\/b>(1), but may still login using <b>rlogin<\/b>(1), run existing processes and initiate new ones through <b>rsh<\/b>(1), <b>cron<\/b>(8), <b>at<\/b>(1), or mail filters, etc. Trying to lock an account by simply changing the shell field yields the same result and additionally allows the use of <b>su<\/b>(1).<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chfn<\/b>(1), <b>chsh<\/b>(1), <b>login<\/b>(1), <b>passwd<\/b>(1), <b>su<\/b>(1), <b>crypt<\/b>(3), <b>getpwent<\/b>(3), <b>getpwnam<\/b>(3), <b>group<\/b>(5), <b>shadow<\/b>(5), <b>vipw<\/b>(8)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  passwd \u2212 password file <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1277],"class_list":["post-4705","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-passwd"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4705","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=4705"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4705\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}