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 <refentry id='passwd.5'>
32 <!-- $Id: passwd.5.xml 3017 2009-06-06 11:21:15Z nekral-guest $ -->
34 <refentrytitle>passwd</refentrytitle>
35 <manvolnum>5</manvolnum>
36 <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
38 <refnamediv id='name'>
39 <refname>passwd</refname>
40 <refpurpose>the password file</refpurpose>
43 <refsect1 id='description'>
44 <title>DESCRIPTION</title>
46 <filename>/etc/passwd</filename> contains one line for each
47 user account, with seven fields delimited by colons
51 <itemizedlist mark='bullet'>
53 <para>login name</para>
56 <para>optional encrypted password</para>
59 <para>numerical user ID</para>
62 <para>numerical group ID</para>
65 <para>user name or comment field</para>
68 <para>user home directory</para>
71 <para>optional user command interpreter</para>
76 The encrypted password field may be blank, in which case no password
77 is required to authenticate as the specified login name. However,
78 some applications which read the <filename>/etc/passwd</filename> file
79 may decide not to permit <emphasis>any</emphasis> access at all if the
80 <emphasis>password</emphasis> field is blank. If the
81 <emphasis>password</emphasis> field is a lower-case <quote>x</quote>,
82 then the encrypted password is actually stored in the
83 <citerefentry><refentrytitle>shadow</refentrytitle>
84 <manvolnum>5</manvolnum></citerefentry> file instead; there
85 <emphasis>must</emphasis> be a corresponding line in the
86 <filename>/etc/shadow</filename> file, or else the user account is invalid.
87 If the <emphasis>password</emphasis> field is any other string, then
88 it will be treated as an encrypted password, as specified by
89 <citerefentry><refentrytitle>crypt</refentrytitle>
90 <manvolnum>3</manvolnum></citerefentry>.
95 The comment field is used by various system utilities, such as
96 <citerefentry><refentrytitle>finger</refentrytitle>
97 <manvolnum>1</manvolnum></citerefentry>.
101 The home directory field provides the name of the initial working
102 directory. The <command>login</command> program uses this information
103 to set the value of the <envar>$HOME</envar> environmental variable.
107 The command interpreter field provides the name of the user's command
108 language interpreter, or the name of the initial program to execute.
109 The <command>login</command> program uses this information to set the
110 value of the <envar>$SHELL</envar> environmental variable. If this
111 field is empty, it defaults to the value <filename>/bin/sh</filename>.
115 <refsect1 id='files'>
119 <term><filename>/etc/passwd</filename></term>
121 <para>User account information.</para>
125 <term><filename>/etc/shadow</filename></term>
127 <para>optional encrypted password file</para>
131 <term><filename>/etc/passwd-</filename></term>
133 <para>Backup file for /etc/passwd.</para>
135 Note that this file is used by the tools of the shadow
136 toolsuite, but not by all user and password management tools.
143 <refsect1 id='see_also'>
144 <title>SEE ALSO</title>
147 <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
150 <refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum>
153 <refentrytitle>getpwnam</refentrytitle><manvolnum>3</manvolnum>
156 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
159 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
162 <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
165 <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
168 <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
171 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
174 <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
177 <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>