Docbook XML conversion: faq
[ira/wip.git] / docs / docbook / manpages / smbpasswd.5.xml
1 <?xml version="1.0" encoding="iso8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities;
6 ]>
7 <refentry id="smbpasswd.5">
8
9 <refmeta>
10         <refentrytitle>smbpasswd</refentrytitle>
11         <manvolnum>5</manvolnum>
12 </refmeta>
13
14
15 <refnamediv>
16         <refname>smbpasswd</refname>
17         <refpurpose>The Samba encrypted password file</refpurpose>
18 </refnamediv>
19
20 <refsynopsisdiv>
21         <para><filename>smbpasswd</filename></para>
22 </refsynopsisdiv>
23
24 <refsect1>
25         <title>DESCRIPTION</title>
26
27         <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
28         <manvolnum>7</manvolnum></citerefentry> suite.</para>
29
30         <para>smbpasswd is the Samba encrypted password file. It contains 
31         the username, Unix user id and the SMB hashed passwords of the 
32         user, as well as account flag information and the time the 
33         password was last changed. This file format has been evolving with 
34         Samba and has had several different formats in the past. </para>
35 </refsect1>
36
37 <refsect1>
38         <title>FILE FORMAT</title>
39
40         <para>The format of the smbpasswd file used by Samba 2.2 
41         is very similar to the familiar Unix <filename>passwd(5)</filename> 
42         file. It is an ASCII file containing one line for each user. Each field 
43         ithin each line is separated from the next by a colon. Any entry 
44         beginning with '#' is ignored. The smbpasswd file contains the 
45         following information for each user: </para>
46
47         <variablelist>
48                 <varlistentry>
49                 <term>name</term>
50                 <listitem><para> This is the user name. It must be a name that 
51                 already exists in the standard UNIX passwd file. </para>
52                 </listitem>
53                 </varlistentry>
54
55                 <varlistentry>
56                 <term>uid</term>
57                 <listitem><para>This is the UNIX uid. It must match the uid
58                 field for the same user entry in the standard UNIX passwd file. 
59                 If this does not match then Samba will refuse to recognize 
60                 this smbpasswd file entry as being valid for a user. 
61                 </para></listitem>
62                 </varlistentry>
63                  
64                  
65                 <varlistentry>
66                 <term>Lanman Password Hash</term>
67                 <listitem><para>This is the LANMAN hash of the user's password, 
68                 encoded as 32 hex digits.  The LANMAN hash is created by DES 
69                 encrypting a well known string with the user's password as the 
70                 DES key. This is the same password used by Windows 95/98 machines. 
71                 Note that this password hash is regarded as weak as it is
72                 vulnerable to dictionary attacks and if two users choose the 
73                 same password this entry will be identical (i.e. the password 
74                 is not "salted" as the UNIX password is). If the user has a 
75                 null password this field will contain the characters "NO PASSWORD" 
76                 as the start of the hex string. If the hex string is equal to 
77                 32 'X' characters then the user's account is marked as 
78                 <constant>disabled</constant> and the user will not be able to 
79                 log onto the Samba server. </para>
80                 
81                 <para><emphasis>WARNING !!</emphasis> Note that, due to 
82                 the challenge-response nature of the SMB/CIFS authentication
83                 protocol, anyone with a knowledge of this password hash will 
84                 be able to impersonate the user on the network. For this
85                 reason these hashes are known as <emphasis>plain text 
86                 equivalents</emphasis> and must <emphasis>NOT</emphasis> be made 
87                 available to anyone but the root user. To protect these passwords 
88                 the smbpasswd file is placed in a directory with read and 
89                 traverse access only to the root user and the smbpasswd file 
90                 itself must be set to be read/write only by root, with no
91                 other access. </para></listitem>
92                 </varlistentry>
93                 
94                 
95                 <varlistentry>
96                 <term>NT Password Hash</term>
97                 <listitem><para>This is the Windows NT hash of the user's 
98                 password, encoded as 32 hex digits.  The Windows NT hash is 
99                 created by taking the user's password as represented in 
100                 16-bit, little-endian UNICODE and then applying the MD4 
101                 (internet rfc1321) hashing algorithm to it. </para>
102                 
103                 <para>This password hash is considered more secure than
104                 the LANMAN Password Hash as it preserves the case of the 
105                 password and uses a much higher quality hashing algorithm. 
106                 However, it is still the case that if two users choose the same 
107                 password this entry will be identical (i.e. the password is 
108                 not "salted" as the UNIX password is). </para>
109
110                 <para><emphasis>WARNING !!</emphasis>. Note that, due to 
111                 the challenge-response nature of the SMB/CIFS authentication
112                 protocol, anyone with a knowledge of this password hash will 
113                 be able to impersonate the user on the network. For this
114                 reason these hashes are known as <emphasis>plain text 
115                 equivalents</emphasis> and must <emphasis>NOT</emphasis> be made 
116                 available to anyone but the root user. To protect these passwords 
117                 the smbpasswd file is placed in a directory with read and 
118                 traverse access only to the root user and the smbpasswd file 
119                 itself must be set to be read/write only by root, with no
120                 other access. </para></listitem>
121                 </varlistentry>
122                 
123
124                 <varlistentry>
125                 <term>Account Flags</term>
126                 <listitem><para>This section contains flags that describe 
127                 the attributes of the users account. In the Samba 2.2 release 
128                 this field is bracketed by '[' and ']' characters and is always 
129                 13 characters in length (including the '[' and ']' characters).
130                 The contents of this field may be any of the following characters:
131                 </para>
132                 
133                 <itemizedlist>
134                         <listitem><para><emphasis>U</emphasis> - This means 
135                         this is a "User" account, i.e. an ordinary user. Only User 
136                         and Workstation Trust accounts are currently supported 
137                         in the smbpasswd file. </para></listitem>
138                         
139                         <listitem><para><emphasis>N</emphasis> - This means the
140                         account has no password (the passwords in the fields LANMAN 
141                         Password Hash and NT Password Hash are ignored). Note that this 
142                         will only allow users to log on with no password if the <parameter>
143                         null passwords</parameter> parameter is set in the <ulink
144                         url="smb.conf.5.html#NULLPASSWORDS"><citerefentry><refentrytitle>smb.conf</refentrytitle>
145                         <manvolnum>5</manvolnum></citerefentry></ulink> config file. </para></listitem>
146                                 
147                         <listitem><para><emphasis>D</emphasis> - This means the account 
148                         is disabled and no SMB/CIFS logins  will be allowed for this user. </para></listitem>
149                         
150                         <listitem><para><emphasis>W</emphasis> - This means this account 
151                         is a "Workstation Trust" account. This kind of account is used 
152                         in the Samba PDC code stream to allow Windows NT Workstations 
153                         and Servers to join a Domain hosted by a Samba PDC. </para>
154                         </listitem>
155                 </itemizedlist>
156                 
157                 <para>Other flags may be added as the code is extended in future.
158                 The rest of this field space is filled in with spaces. </para>
159                 </listitem>
160                 </varlistentry>
161                 
162                 
163                 <varlistentry>
164                 <term>Last Change Time</term>
165                 <listitem><para>This field consists of the time the account was 
166                 last modified. It consists of the characters 'LCT-' (standing for 
167                 "Last Change Time") followed by a numeric encoding of the UNIX time 
168                 in seconds since the epoch (1970) that the last change was made. 
169                 </para></listitem>
170                 </varlistentry>
171         </variablelist>
172         
173         <para>All other colon separated fields are ignored at this time.</para> 
174 </refsect1>
175
176 <refsect1>
177         <title>VERSION</title>
178
179         <para>This man page is correct for version 3.0 of 
180         the Samba suite.</para>
181 </refsect1>
182
183 <refsect1>
184         <title>SEE ALSO</title>
185         <para><citerefentry><refentrytitle>smbpasswd</refentrytitle>
186         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>Samba</refentrytitle>
187         <manvolnum>7</manvolnum></citerefentry>, and
188         the Internet RFC1321 for details on the MD4 algorithm.
189         </para>
190 </refsect1>
191
192 <refsect1>
193         <title>AUTHOR</title>
194         
195         <para>The original Samba software and related utilities 
196         were created by Andrew Tridgell. Samba is now developed
197         by the Samba Team as an Open Source project similar 
198         to the way the Linux kernel is developed.</para>
199         
200         <para>The original Samba man pages were written by Karl Auer. 
201         The man page sources were converted to YODL format (another 
202         excellent piece of Open Source software, available at <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
203         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
204         release by Jeremy Allison.  The conversion to DocBook for 
205         Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2
206         for Samba 3.0 was done by Alexander Bokovoy.</para>
207 </refsect1>
208
209 </refentry>