7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.57"></HEAD
27 >smbpasswd
--
The Samba encrypted password file
</DIV
29 CLASS=
"REFSYNOPSISDIV"
49 >This tool is part of the
<A
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
69 >The format of the smbpasswd file used by Samba
2.2
70 is very similar to the familiar Unix
<TT
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
87 > This is the user name. It must be a name that
88 already exists in the standard UNIX passwd file.
</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.
101 >Lanman Password Hash
</DT
104 >This is the LANMAN hash of the users password,
105 encoded as
32 hex digits. The LANMAN hash is created by DES
106 encrypting a well known string with the users 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 users account is marked as
118 > and the user will not be able to
119 log onto the Samba server.
</P
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
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
140 >NT Password Hash
</DT
143 >This is the Windows NT hash of the users
144 password, encoded as
32 hex digits. The Windows NT hash is
145 created by taking the users password as represented in
146 16-bit, little-endian UNICODE and then applying the MD4
147 (internet rfc1321) hashing algorithm to it.
</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
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
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
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.
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
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
208 > parameter is set in the
<A
209 HREF=
"smb.conf.5.html#NULLPASSWORDS"
222 > - This means the account
223 is disabled and no SMB/CIFS logins will be allowed for
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
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
241 >Last Change Time
</DT
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.
253 >All other colon separated fields are ignored at this time.
</P
263 >This man page is correct for version
2.2 of
275 HREF=
"smbpasswd.8.html"
287 the Internet RFC1321 for details on the MD4 algorithm.
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
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
307 HREF=
"ftp://ftp.icce.rug.nl/pub/unix/"
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