This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[kai/samba.git] / docs / manpages / smbpasswd.5
1 .\" This manpage has been automatically generated by docbook2man 
2 .\" from a DocBook document.  This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBPASSWD" "5" "26 November 2002" "" ""
7 .SH NAME
8 smbpasswd \- The Samba encrypted password file
9 .SH SYNOPSIS
10 .PP
11 \fIsmbpasswd\fR
12 .SH "DESCRIPTION"
13 .PP
14 This tool is part of the  Samba suite.
15 .PP
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. 
21 .SH "FILE FORMAT"
22 .PP
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: 
29 .TP
30 \fBname\fR
31 This is the user name. It must be a name that 
32 already exists in the standard UNIX passwd file. 
33 .TP
34 \fBuid\fR
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. 
39 .TP
40 \fBLanman Password Hash\fR
41 This is the LANMAN hash of the user's password, 
42 encoded as 32 hex digits.  The LANMAN hash is created by DES 
43 encrypting a well known string with the user's 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 user's account is marked as 
52 disabled and the user will not be able to 
53 log onto the Samba server. 
54
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
65 other access. 
66 .TP
67 \fBNT Password Hash\fR
68 This is the Windows NT hash of the user's 
69 password, encoded as 32 hex digits.  The Windows NT hash is 
70 created by taking the user's password as represented in 
71 16-bit, little-endian UNICODE and then applying the MD4 
72 (internet rfc1321) hashing algorithm to it. 
73
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). 
80
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
91 other access. 
92 .TP
93 \fBAccount Flags\fR
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.
99 .RS
100 .TP 0.2i
101 \(bu
102 \fBU\fR - This means 
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. 
106 .TP 0.2i
107 \(bu
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)
112 \fR config file. 
113 .TP 0.2i
114 \(bu
115 \fBD\fR - This means the account 
116 is disabled and no SMB/CIFS logins  will be allowed for 
117 this user. 
118 .TP 0.2i
119 \(bu
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. 
124 .RE
125
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. 
128 .TP
129 \fBLast Change Time\fR
130 This field consists of the time the account was 
131 last modified. It consists of the characters 'LCT-' (standing for 
132 "Last Change Time") followed by a numeric encoding of the UNIX time 
133 in seconds since the epoch (1970) that the last change was made. 
134 .PP
135 All other colon separated fields are ignored at this time.
136 .SH "VERSION"
137 .PP
138 This man page is correct for version 3.0 of 
139 the Samba suite.
140 .SH "SEE ALSO"
141 .PP
142 \fBsmbpasswd(8)\fR 
143 samba(7) and
144 the Internet RFC1321 for details on the MD4 algorithm.
145 .SH "AUTHOR"
146 .PP
147 The original Samba software and related utilities 
148 were created by Andrew Tridgell. Samba is now developed
149 by the Samba Team as an Open Source project similar 
150 to the way the Linux kernel is developed.
151 .PP
152 The original Samba man pages were written by Karl Auer. 
153 The man page sources were converted to YODL format (another 
154 excellent piece of Open Source software, available at
155 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 
156 release by Jeremy Allison.  The conversion to DocBook for 
157 Samba 2.2 was done by Gerald Carter