1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1989 - 1990, Julianne Frances Haugh
4 Copyright (c) 2007 - 2008, Nicolas François
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. The name of the copyright holders or contributors may not be used to
16 endorse or promote products derived from this software without
17 specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
32 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33 <!-- SHADOW-CONFIG-HERE -->
35 <refentry id='passwd.5'>
39 <firstname>Julianne Frances</firstname>
40 <surname>Haugh</surname>
41 <contrib>Creation, 1989</contrib>
44 <firstname>Thomas</firstname>
45 <surname>Kłoczko</surname>
46 <email>kloczek@pld.org.pl</email>
47 <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
50 <firstname>Nicolas</firstname>
51 <surname>François</surname>
52 <email>nicolas.francois@centraliens.net</email>
53 <contrib>shadow-utils maintainer, 2007 - now</contrib>
57 <refentrytitle>passwd</refentrytitle>
58 <manvolnum>5</manvolnum>
59 <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
60 <refmiscinfo class="source">shadow-utils</refmiscinfo>
61 <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
63 <refnamediv id='name'>
64 <refname>passwd</refname>
65 <refpurpose>the password file</refpurpose>
68 <refsect1 id='description'>
69 <title>DESCRIPTION</title>
71 <filename>/etc/passwd</filename> contains one line for each
72 user account, with seven fields delimited by colons
76 <itemizedlist mark='bullet'>
78 <para>login name</para>
81 <para>optional encrypted password</para>
84 <para>numerical user ID</para>
87 <para>numerical group ID</para>
90 <para>user name or comment field</para>
93 <para>user home directory</para>
96 <para>optional user command interpreter</para>
101 The encrypted password field may be blank, in which case no password
102 is required to authenticate as the specified login name. However,
103 some applications which read the <filename>/etc/passwd</filename> file
104 may decide not to permit <emphasis>any</emphasis> access at all if the
105 <emphasis>password</emphasis> field is blank. If the
106 <emphasis>password</emphasis> field is a lower-case <quote>x</quote>,
107 then the encrypted password is actually stored in the
108 <citerefentry><refentrytitle>shadow</refentrytitle>
109 <manvolnum>5</manvolnum></citerefentry> file instead; there
110 <emphasis>must</emphasis> be a corresponding line in the
111 <filename>/etc/shadow</filename> file, or else the user account is invalid.
112 If the <emphasis>password</emphasis> field is any other string, then
113 it will be treated as an encrypted password, as specified by
114 <citerefentry><refentrytitle>crypt</refentrytitle>
115 <manvolnum>3</manvolnum></citerefentry>.
120 The comment field is used by various system utilities, such as
121 <citerefentry><refentrytitle>finger</refentrytitle>
122 <manvolnum>1</manvolnum></citerefentry>.
126 The home directory field provides the name of the initial working
127 directory. The <command>login</command> program uses this information
128 to set the value of the <envar>$HOME</envar> environmental variable.
132 The command interpreter field provides the name of the user's command
133 language interpreter, or the name of the initial program to execute.
134 The <command>login</command> program uses this information to set the
135 value of the <envar>$SHELL</envar> environmental variable. If this
136 field is empty, it defaults to the value <filename>/bin/sh</filename>.
140 <refsect1 id='files'>
144 <term><filename>/etc/passwd</filename></term>
146 <para>User account information.</para>
150 <term><filename>/etc/shadow</filename></term>
152 <para>optional encrypted password file</para>
156 <term><filename>/etc/passwd-</filename></term>
158 <para>Backup file for /etc/passwd.</para>
160 Note that this file is used by the tools of the shadow
161 toolsuite, but not by all user and password management tools.
168 <refsect1 id='see_also'>
169 <title>SEE ALSO</title>
172 <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
175 <refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum>
178 <refentrytitle>getpwnam</refentrytitle><manvolnum>3</manvolnum>
181 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
184 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
187 <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
190 <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
193 <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
196 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
199 <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
202 <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>