1SMBPASSWD(5)             File Formats and Conventions             SMBPASSWD(5)
2
3
4

NAME

6       smbpasswd - The Samba encrypted password file
7

SYNOPSIS

9       smbpasswd
10

DESCRIPTION

12       This tool is part of the samba(7) suite.
13
14       smbpasswd is the Samba encrypted password file. It contains the
15       username, Unix user id and the SMB hashed passwords of the user, as
16       well as account flag information and the time the password was last
17       changed. This file format has been evolving with Samba and has had
18       several different formats in the past.
19

FILE FORMAT

21       The format of the smbpasswd file used by Samba 2.2 is very similar to
22       the familiar Unix passwd(5) file. It is an ASCII file containing one
23       line for each user. Each field within each line is separated from the
24       next by a colon. Any entry beginning with '#' is ignored. The smbpasswd
25       file contains the following information for each user:
26
27       name
28           This is the user name. It must be a name that already exists in the
29           standard UNIX passwd file.
30
31       uid
32           This is the UNIX uid. It must match the uid field for the same user
33           entry in the standard UNIX passwd file. If this does not match then
34           Samba will refuse to recognize this smbpasswd file entry as being
35           valid for a user.
36
37       Lanman Password Hash
38           This is the LANMAN hash of the user's password, encoded as 32 hex
39           digits. The LANMAN hash is created by DES encrypting a well known
40           string with the user's password as the DES key. This is the same
41           password used by Windows 95/98 machines. Note that this password
42           hash is regarded as weak as it is vulnerable to dictionary attacks
43           and if two users choose the same password this entry will be
44           identical (i.e. the password is not "salted" as the UNIX password
45           is). If the user has a null password this field will contain the
46           characters "NO PASSWORD" as the start of the hex string. If the hex
47           string is equal to 32 'X' characters then the user's account is
48           marked as disabled and the user will not be able to log onto the
49           Samba server.
50
51           WARNING !!  Note that, due to the challenge-response nature of the
52           SMB/CIFS authentication protocol, anyone with a knowledge of this
53           password hash will be able to impersonate the user on the network.
54           For this reason these hashes are known as plain text equivalents
55           and must NOT be made available to anyone but the root user. To
56           protect these passwords the smbpasswd file is placed in a directory
57           with read and traverse access only to the root user and the
58           smbpasswd file itself must be set to be read/write only by root,
59           with no other access.
60
61       NT Password Hash
62           This is the Windows NT hash of the user's password, encoded as 32
63           hex digits. The Windows NT hash is created by taking the user's
64           password as represented in 16-bit, little-endian UNICODE and then
65           applying the MD4 (internet rfc1321) hashing algorithm to it.
66
67           This password hash is considered more secure than the LANMAN
68           Password Hash as it preserves the case of the password and uses a
69           much higher quality hashing algorithm. However, it is still the
70           case that if two users choose the same password this entry will be
71           identical (i.e. the password is not "salted" as the UNIX password
72           is).
73
74           WARNING !!. Note that, due to the challenge-response nature of the
75           SMB/CIFS authentication protocol, anyone with a knowledge of this
76           password hash will be able to impersonate the user on the network.
77           For this reason these hashes are known as plain text equivalents
78           and must NOT be made available to anyone but the root user. To
79           protect these passwords the smbpasswd file is placed in a directory
80           with read and traverse access only to the root user and the
81           smbpasswd file itself must be set to be read/write only by root,
82           with no other access.
83
84       Account Flags
85           This section contains flags that describe the attributes of the
86           users account. This field is bracketed by '[' and ']' characters
87           and is always 13 characters in length (including the '[' and ']'
88           characters). The contents of this field may be any of the following
89           characters:
90
91                  ·   U - This means this is a "User" account, i.e. an
92                      ordinary user.
93
94                  ·   N - This means the account has no password (the
95                      passwords in the fields LANMAN Password Hash and NT
96                      Password Hash are ignored). Note that this will only
97                      allow users to log on with no password if the
98                       null passwords parameter is set in the smb.conf(5)
99                      config file.
100
101                  ·   D - This means the account is disabled and no SMB/CIFS
102                      logins will be allowed for this user.
103
104                  ·   X - This means the password does not expire.
105
106                  ·   W - This means this account is a "Workstation Trust"
107                      account. This kind of account is used in the Samba PDC
108                      code stream to allow Windows NT Workstations and Servers
109                      to join a Domain hosted by a Samba PDC.
110
111           Other flags may be added as the code is extended in future. The
112           rest of this field space is filled in with spaces. For further
113           information regarding the flags that are supported please refer to
114           the man page for the pdbedit command.
115
116       Last Change Time
117           This field consists of the time the account was last modified. It
118           consists of the characters 'LCT-' (standing for "Last Change Time")
119           followed by a numeric encoding of the UNIX time in seconds since
120           the epoch (1970) that the last change was made.
121
122       All other colon separated fields are ignored at this time.
123

VERSION

125       This man page is part of version 4.9.8 of the Samba suite.
126

SEE ALSO

128       smbpasswd(8), Samba(7), and the Internet RFC1321 for details on the MD4
129       algorithm.
130

AUTHOR

132       The original Samba software and related utilities were created by
133       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
134       Source project similar to the way the Linux kernel is developed.
135
136
137
138Samba 4.9.8                       05/14/2019                      SMBPASSWD(5)
Impressum