1 .\" This manpage has been automatically generated by docbook2man-spec
2 .\" from a DocBook document. docbook2man-spec can be found at:
3 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBPASSWD" "5" "24 April 2001" "" ""
8 smbpasswd \- The Samba encrypted password file
14 This tool is part of the Sambasuite.
16 smbpasswd is the Samba encrypted password file. It contains
17 the username, Unix user id and the SMB hashed passwords of the
18 user, as well as account flag information and the time the
19 password was last changed. This file format has been evolving with
20 Samba and has had several different formats in the past.
23 The format of the smbpasswd file used by Samba 2.2
24 is very similar to the familiar Unix \fIpasswd(5)\fR
25 file. It is an ASCII file containing one line for each user. Each field
26 ithin each line is separated from the next by a colon. Any entry
27 beginning with '#' is ignored. The smbpasswd file contains the
28 following information for each user:
31 This is the user name. It must be a name that
32 already exists in the standard UNIX passwd file.
35 This is the UNIX uid. It must match the uid
36 field for the same user entry in the standard UNIX passwd file.
37 If this does not match then Samba will refuse to recognize
38 this smbpasswd file entry as being valid for a user.
40 \fBLanman Password Hash\fR
41 This is the LANMAN hash of the users password,
42 encoded as 32 hex digits. The LANMAN hash is created by DES
43 encrypting a well known string with the users password as the
44 DES key. This is the same password used by Windows 95/98 machines.
45 Note that this password hash is regarded as weak as it is
46 vulnerable to dictionary attacks and if two users choose the
47 same password this entry will be identical (i.e. the password
48 is not "salted" as the UNIX password is). If the user has a
49 null password this field will contain the characters "NO PASSWORD"
50 as the start of the hex string. If the hex string is equal to
51 32 'X' characters then the users account is marked as
52 disabled and the user will not be able to
53 log onto the Samba server.
55 \fBWARNING !!\fR Note that, due to
56 the challenge-response nature of the SMB/CIFS authentication
57 protocol, anyone with a knowledge of this password hash will
58 be able to impersonate the user on the network. For this
59 reason these hashes are known as \fBplain text
60 equivalents\fR and must \fBNOT\fR be made
61 available to anyone but the root user. To protect these passwords
62 the smbpasswd file is placed in a directory with read and
63 traverse access only to the root user and the smbpasswd file
64 itself must be set to be read/write only by root, with no
67 \fBNT Password Hash\fR
68 This is the Windows NT hash of the users
69 password, encoded as 32 hex digits. The Windows NT hash is
70 created by taking the users password as represented in
71 16-bit, little-endian UNICODE and then applying the MD4
72 (internet rfc1321) hashing algorithm to it.
74 This password hash is considered more secure than
75 the Lanman Password Hash as it preserves the case of the
76 password and uses a much higher quality hashing algorithm.
77 However, it is still the case that if two users choose the same
78 password this entry will be identical (i.e. the password is
79 not "salted" as the UNIX password is).
81 \fBWARNING !!\fR. 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 \fBplain text
86 equivalents\fR and must \fBNOT\fR 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
94 This section contains flags that describe
95 the attributes of the users account. In the Samba 2.2 release
96 this field is bracketed by '[' and ']' characters and is always
97 13 characters in length (including the '[' and ']' characters).
98 The contents of this field may be any of the characters.
103 this is a "User" account, i.e. an ordinary user. Only User
104 and Workstation Trust accounts are currently supported
105 in the smbpasswd file.
108 \fBN\fR - This means the
109 account has no password (the passwords in the fields Lanman
110 Password Hash and NT Password Hash are ignored). Note that this
111 will only allow users to log on with no password if the \fI null passwords\fR parameter is set in the \fIsmb.conf(5)
115 \fBD\fR - This means the account
116 is disabled and no SMB/CIFS logins will be allowed for
120 \fBW\fR - This means this account
121 is a "Workstation Trust" account. This kind of account is used
122 in the Samba PDC code stream to allow Windows NT Workstations
123 and Servers to join a Domain hosted by a Samba PDC.
126 Other flags may be added as the code is extended in future.
127 The rest of this field space is filled in with spaces.
130 \fBLast Change Time\fR
131 This field consists of the time the account was
132 last modified. It consists of the characters 'LCT-' (standing for
133 "Last Change Time") followed by a numeric encoding of the UNIX time
134 in seconds since the epoch (1970) that the last change was made.
136 All other colon separated fields are ignored at this time.
140 This man page is correct for version 2.2 of
146 the Internet RFC1321 for details on the MD4 algorithm.
149 The original Samba software and related utilities
150 were created by Andrew Tridgell. Samba is now developed
151 by the Samba Team as an Open Source project similar
152 to the way the Linux kernel is developed.
154 The original Samba man pages were written by Karl Auer.
155 The man page sources were converted to YODL format (another
156 excellent piece of Open Source software, available at
157 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0
158 release by Jeremy Allison. The conversion to DocBook for
159 Samba 2.2 was done by Gerald Carter