Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / passwd.5.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1989 - 1990, Julianne Frances Haugh
4    Copyright (c) 2007 - 2008, Nicolas François
5    All rights reserved.
6   
7    Redistribution and use in source and binary forms, with or without
8    modification, are permitted provided that the following conditions
9    are met:
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.
18   
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.
30 -->
31 <refentry id='passwd.5'>
32   <!-- $Id: passwd.5.xml 3017 2009-06-06 11:21:15Z nekral-guest $ -->
33   <refmeta>
34     <refentrytitle>passwd</refentrytitle>
35     <manvolnum>5</manvolnum>
36     <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
37   </refmeta>
38   <refnamediv id='name'>
39     <refname>passwd</refname>
40     <refpurpose>the password file</refpurpose>
41   </refnamediv>
42
43   <refsect1 id='description'>
44     <title>DESCRIPTION</title>
45     <para>
46       <filename>/etc/passwd</filename> contains one line for each
47       user account, with seven fields delimited by colons
48       (<quote>:</quote>).
49       These fields are:
50     </para>
51     <itemizedlist mark='bullet'>
52       <listitem>
53         <para>login name</para>
54       </listitem>
55       <listitem>
56         <para>optional encrypted password</para>
57       </listitem>
58       <listitem>
59         <para>numerical user ID</para>
60       </listitem>
61       <listitem>
62         <para>numerical group ID</para>
63       </listitem>
64       <listitem>
65         <para>user name or comment field</para>
66       </listitem>
67       <listitem>
68         <para>user home directory</para>
69       </listitem>
70       <listitem>
71         <para>optional user command interpreter</para>
72       </listitem>
73     </itemizedlist>
74
75     <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>.
91
92     </para>
93
94     <para>
95       The comment field is used by various system utilities, such as
96       <citerefentry><refentrytitle>finger</refentrytitle>
97       <manvolnum>1</manvolnum></citerefentry>.
98     </para>
99
100     <para>
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.
104     </para>
105
106     <para>
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>.
112     </para>
113   </refsect1>
114
115   <refsect1 id='files'>
116     <title>FILES</title>
117     <variablelist>
118       <varlistentry>
119         <term><filename>/etc/passwd</filename></term>
120         <listitem>
121           <para>User account information.</para>
122         </listitem>
123       </varlistentry>
124       <varlistentry>
125         <term><filename>/etc/shadow</filename></term>
126         <listitem>
127           <para>optional encrypted password file</para>
128         </listitem>
129       </varlistentry>
130       <varlistentry>
131         <term><filename>/etc/passwd-</filename></term>
132         <listitem>
133           <para>Backup file for /etc/passwd.</para>
134           <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.
137           </para>
138         </listitem>
139       </varlistentry>
140     </variablelist>
141   </refsect1>
142
143   <refsect1 id='see_also'>
144     <title>SEE ALSO</title>
145     <para>
146       <citerefentry>
147         <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
148       </citerefentry>,
149       <citerefentry>
150         <refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum>
151       </citerefentry>,
152       <citerefentry>
153         <refentrytitle>getpwnam</refentrytitle><manvolnum>3</manvolnum>
154       </citerefentry>,
155       <citerefentry>
156         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
157       </citerefentry>,
158       <citerefentry>
159         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
160       </citerefentry>,
161       <citerefentry>
162         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
163       </citerefentry>,
164       <citerefentry>
165         <refentrytitle>pwconv</refentrytitle><manvolnum>8</manvolnum>
166       </citerefentry>,
167       <citerefentry>
168         <refentrytitle>pwunconv</refentrytitle><manvolnum>8</manvolnum>
169       </citerefentry>,
170       <citerefentry>
171         <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
172       </citerefentry>,
173       <citerefentry>
174         <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
175       </citerefentry>,
176       <citerefentry>
177         <refentrytitle>sulogin</refentrytitle><manvolnum>8</manvolnum>
178       </citerefentry>.
179     </para>
180   </refsect1>
181 </refentry>