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