This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[jra/samba/.git] / docs / htmldocs / smbpasswd.5.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >smbpasswd</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
8 ><BODY
9 CLASS="REFENTRY"
10 BGCOLOR="#FFFFFF"
11 TEXT="#000000"
12 LINK="#0000FF"
13 VLINK="#840084"
14 ALINK="#0000FF"
15 ><H1
16 ><A
17 NAME="SMBPASSWD"
18 >smbpasswd</A
19 ></H1
20 ><DIV
21 CLASS="REFNAMEDIV"
22 ><A
23 NAME="AEN5"
24 ></A
25 ><H2
26 >Name</H2
27 >smbpasswd&nbsp;--&nbsp;The Samba encrypted password file</DIV
28 ><DIV
29 CLASS="REFSYNOPSISDIV"
30 ><A
31 NAME="AEN8"
32 ></A
33 ><H2
34 >Synopsis</H2
35 ><P
36 ><TT
37 CLASS="FILENAME"
38 >smbpasswd</TT
39 ></P
40 ></DIV
41 ><DIV
42 CLASS="REFSECT1"
43 ><A
44 NAME="AEN11"
45 ></A
46 ><H2
47 >DESCRIPTION</H2
48 ><P
49 >This tool is part of the <A
50 HREF="samba.7.html"
51 TARGET="_top"
52 >       Samba</A
53 > suite.</P
54 ><P
55 >smbpasswd is the Samba encrypted password file. It contains 
56         the username, Unix user id and the SMB hashed passwords of the 
57         user, as well as account flag information and the time the 
58         password was last changed. This file format has been evolving with 
59         Samba and has had several different formats in the past. </P
60 ></DIV
61 ><DIV
62 CLASS="REFSECT1"
63 ><A
64 NAME="AEN16"
65 ></A
66 ><H2
67 >FILE FORMAT</H2
68 ><P
69 >The format of the smbpasswd file used by Samba 2.2 
70         is very similar to the familiar Unix <TT
71 CLASS="FILENAME"
72 >passwd(5)</TT
73
74         file. It is an ASCII file containing one line for each user. Each field 
75         ithin each line is separated from the next by a colon. Any entry 
76         beginning with '#' is ignored. The smbpasswd file contains the 
77         following information for each user: </P
78 ><P
79 ></P
80 ><DIV
81 CLASS="VARIABLELIST"
82 ><DL
83 ><DT
84 >name</DT
85 ><DD
86 ><P
87 > This is the user name. It must be a name that 
88                 already exists in the standard UNIX passwd file. </P
89 ></DD
90 ><DT
91 >uid</DT
92 ><DD
93 ><P
94 >This is the UNIX uid. It must match the uid
95                 field for the same user entry in the standard UNIX passwd file. 
96                 If this does not match then Samba will refuse to recognize 
97                 this smbpasswd file entry as being valid for a user. 
98                 </P
99 ></DD
100 ><DT
101 >Lanman Password Hash</DT
102 ><DD
103 ><P
104 >This is the LANMAN hash of the user's password, 
105                 encoded as 32 hex digits.  The LANMAN hash is created by DES 
106                 encrypting a well known string with the user's password as the 
107                 DES key. This is the same password used by Windows 95/98 machines. 
108                 Note that this password hash is regarded as weak as it is
109                 vulnerable to dictionary attacks and if two users choose the 
110                 same password this entry will be identical (i.e. the password 
111                 is not "salted" as the UNIX password is). If the user has a 
112                 null password this field will contain the characters "NO PASSWORD" 
113                 as the start of the hex string. If the hex string is equal to 
114                 32 'X' characters then the user's account is marked as 
115                 <TT
116 CLASS="CONSTANT"
117 >disabled</TT
118 > and the user will not be able to 
119                 log onto the Samba server. </P
120 ><P
121 ><EM
122 >WARNING !!</EM
123 > Note that, due to 
124                 the challenge-response nature of the SMB/CIFS authentication
125                 protocol, anyone with a knowledge of this password hash will 
126                 be able to impersonate the user on the network. For this
127                 reason these hashes are known as <EM
128 >plain text 
129                 equivalents</EM
130 > and must <EM
131 >NOT</EM
132 > be made 
133                 available to anyone but the root user. To protect these passwords 
134                 the smbpasswd file is placed in a directory with read and 
135                 traverse access only to the root user and the smbpasswd file 
136                 itself must be set to be read/write only by root, with no
137                 other access. </P
138 ></DD
139 ><DT
140 >NT Password Hash</DT
141 ><DD
142 ><P
143 >This is the Windows NT hash of the user's 
144                 password, encoded as 32 hex digits.  The Windows NT hash is 
145                 created by taking the user's password as represented in 
146                 16-bit, little-endian UNICODE and then applying the MD4 
147                 (internet rfc1321) hashing algorithm to it. </P
148 ><P
149 >This password hash is considered more secure than
150                 the LANMAN Password Hash as it preserves the case of the 
151                 password and uses a much higher quality hashing algorithm. 
152                 However, it is still the case that if two users choose the same 
153                 password this entry will be identical (i.e. the password is 
154                 not "salted" as the UNIX password is). </P
155 ><P
156 ><EM
157 >WARNING !!</EM
158 >. Note that, due to 
159                 the challenge-response nature of the SMB/CIFS authentication
160                 protocol, anyone with a knowledge of this password hash will 
161                 be able to impersonate the user on the network. For this
162                 reason these hashes are known as <EM
163 >plain text 
164                 equivalents</EM
165 > and must <EM
166 >NOT</EM
167 > be made 
168                 available to anyone but the root user. To protect these passwords 
169                 the smbpasswd file is placed in a directory with read and 
170                 traverse access only to the root user and the smbpasswd file 
171                 itself must be set to be read/write only by root, with no
172                 other access. </P
173 ></DD
174 ><DT
175 >Account Flags</DT
176 ><DD
177 ><P
178 >This section contains flags that describe 
179                 the attributes of the users account. In the Samba 2.2 release 
180                 this field is bracketed by '[' and ']' characters and is always 
181                 13 characters in length (including the '[' and ']' characters).
182                 The contents of this field may be any of the characters.
183                 </P
184 ><P
185 ></P
186 ><UL
187 ><LI
188 ><P
189 ><EM
190 >U</EM
191 > - This means 
192                         this is a "User" account, i.e. an ordinary user. Only User 
193                         and Workstation Trust accounts are currently supported 
194                         in the smbpasswd file. </P
195 ></LI
196 ><LI
197 ><P
198 ><EM
199 >N</EM
200 > - This means the
201                         account has no password (the passwords in the fields LANMAN 
202                         Password Hash and NT Password Hash are ignored). Note that this 
203                         will only allow users to log on with no password if the <TT
204 CLASS="PARAMETER"
205 ><I
206 >                       null passwords</I
207 ></TT
208 > parameter is set in the <A
209 HREF="smb.conf.5.html#NULLPASSWORDS"
210 TARGET="_top"
211 ><TT
212 CLASS="FILENAME"
213 >smb.conf(5)
214                         </TT
215 ></A
216 > config file. </P
217 ></LI
218 ><LI
219 ><P
220 ><EM
221 >D</EM
222 > - This means the account 
223                         is disabled and no SMB/CIFS logins  will be     allowed for 
224                         this user. </P
225 ></LI
226 ><LI
227 ><P
228 ><EM
229 >W</EM
230 > - This means this account 
231                         is a "Workstation Trust" account. This kind of account is used 
232                         in the Samba PDC code stream to allow Windows NT Workstations 
233                         and Servers to join a Domain hosted by a Samba PDC. </P
234 ></LI
235 ></UL
236 ><P
237 >Other flags may be added as the code is extended in future.
238                 The rest of this field space is filled in with spaces. </P
239 ></DD
240 ><DT
241 >Last Change Time</DT
242 ><DD
243 ><P
244 >This field consists of the time the account was 
245                 last modified. It consists of the characters 'LCT-' (standing for 
246                 "Last Change Time") followed by a numeric encoding of the UNIX time 
247                 in seconds since the epoch (1970) that the last change was made. 
248                 </P
249 ></DD
250 ></DL
251 ></DIV
252 ><P
253 >All other colon separated fields are ignored at this time.</P
254 ></DIV
255 ><DIV
256 CLASS="REFSECT1"
257 ><A
258 NAME="AEN73"
259 ></A
260 ><H2
261 >VERSION</H2
262 ><P
263 >This man page is correct for version 2.2 of 
264         the Samba suite.</P
265 ></DIV
266 ><DIV
267 CLASS="REFSECT1"
268 ><A
269 NAME="AEN76"
270 ></A
271 ><H2
272 >SEE ALSO</H2
273 ><P
274 ><A
275 HREF="smbpasswd.8.html"
276 TARGET="_top"
277 ><B
278 CLASS="COMMAND"
279 >smbpasswd(8)</B
280 ></A
281 >, 
282         <A
283 HREF="samba.7.html"
284 TARGET="_top"
285 >samba(7)</A
286 >, and
287         the Internet RFC1321 for details on the MD4 algorithm.
288         </P
289 ></DIV
290 ><DIV
291 CLASS="REFSECT1"
292 ><A
293 NAME="AEN82"
294 ></A
295 ><H2
296 >AUTHOR</H2
297 ><P
298 >The original Samba software and related utilities 
299         were created by Andrew Tridgell. Samba is now developed
300         by the Samba Team as an Open Source project similar 
301         to the way the Linux kernel is developed.</P
302 ><P
303 >The original Samba man pages were written by Karl Auer. 
304         The man page sources were converted to YODL format (another 
305         excellent piece of Open Source software, available at
306         <A
307 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
308 TARGET="_top"
309 >       ftp://ftp.icce.rug.nl/pub/unix/</A
310 >) and updated for the Samba 2.0 
311         release by Jeremy Allison.  The conversion to DocBook for 
312         Samba 2.2 was done by Gerald Carter</P
313 ></DIV
314 ></BODY
315 ></HTML
316 >