1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
28 >smbpasswd -- The Samba encrypted password file</DIV
30 CLASS="REFSYNOPSISDIV"
50 >This tool is part of the <A
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
70 >The format of the smbpasswd file used by Samba 2.2
71 is very similar to the familiar Unix <TT
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
88 > This is the user name. It must be a name that
89 already exists in the standard UNIX passwd file. </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.
102 >Lanman Password Hash</DT
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
119 > and the user will not be able to
120 log onto the Samba server. </P
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
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
153 >NT Password Hash</DT
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
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
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
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
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.
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
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
241 > parameter is set in the <A
242 HREF="smb.conf.5.html#NULLPASSWORDS"
259 > - This means the account
260 is disabled and no SMB/CIFS logins will be allowed for
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
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
282 >Last Change Time</DT
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.
294 >All other colon separated fields are ignored at this time.</P
304 >This man page is correct for version 2.2 of
316 HREF="smbpasswd.8.html"
328 the Internet RFC1321 for details on the MD4 algorithm.
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
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
348 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
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