Regenerate docs
[kamenim/samba-autobuild/.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" "19 april 2003" "" ""
7
8 .SH NAME
9 smbpasswd \- The Samba encrypted password file
10 .SH SYNOPSIS
11 .PP
12 \fIsmbpasswd\fR
13 .SH "DESCRIPTION"
14 .PP
15 This tool is part of the \fBSamba\fR(7) suite.
16 .PP
17 smbpasswd is the Samba encrypted password file. It contains 
18 the username, Unix user id and the SMB hashed passwords of the 
19 user, as well as account flag information and the time the 
20 password was last changed. This file format has been evolving with 
21 Samba and has had several different formats in the past. 
22 .SH "FILE FORMAT"
23 .PP
24 The format of the smbpasswd file used by Samba 2.2 
25 is very similar to the familiar Unix \fIpasswd(5)\fR 
26 file. It is an ASCII file containing one line for each user. Each field 
27 ithin each line is separated from the next by a colon. Any entry 
28 beginning with '#' is ignored. The smbpasswd file contains the 
29 following information for each user: 
30 .TP
31 \fBname\fR
32 This is the user name. It must be a name that 
33 already exists in the standard UNIX passwd file. 
34 .TP
35 \fBuid\fR
36 This is the UNIX uid. It must match the uid
37 field for the same user entry in the standard UNIX passwd file. 
38 If this does not match then Samba will refuse to recognize 
39 this smbpasswd file entry as being valid for a user. 
40 .TP
41 \fBLanman Password Hash\fR
42 This is the LANMAN hash of the user's password, 
43 encoded as 32 hex digits.  The LANMAN hash is created by DES 
44 encrypting a well known string with the user's password as the 
45 DES key. This is the same password used by Windows 95/98 machines. 
46 Note that this password hash is regarded as weak as it is
47 vulnerable to dictionary attacks and if two users choose the 
48 same password this entry will be identical (i.e. the password 
49 is not "salted" as the UNIX password is). If the user has a 
50 null password this field will contain the characters "NO PASSWORD" 
51 as the start of the hex string. If the hex string is equal to 
52 32 'X' characters then the user's account is marked as 
53 disabled and the user will not be able to 
54 log onto the Samba server. 
55
56 \fBWARNING !!\fR Note that, due to 
57 the challenge-response nature of the SMB/CIFS authentication
58 protocol, anyone with a knowledge of this password hash will 
59 be able to impersonate the user on the network. For this
60 reason these hashes are known as \fBplain text 
61 equivalents\fR and must \fBNOT\fR be made 
62 available to anyone but the root user. To protect these passwords 
63 the smbpasswd file is placed in a directory with read and 
64 traverse access only to the root user and the smbpasswd file 
65 itself must be set to be read/write only by root, with no
66 other access. 
67 .TP
68 \fBNT Password Hash\fR
69 This is the Windows NT hash of the user's 
70 password, encoded as 32 hex digits.  The Windows NT hash is 
71 created by taking the user's password as represented in 
72 16-bit, little-endian UNICODE and then applying the MD4 
73 (internet rfc1321) hashing algorithm to it. 
74
75 This password hash is considered more secure than
76 the LANMAN Password Hash as it preserves the case of the 
77 password and uses a much higher quality hashing algorithm. 
78 However, it is still the case that if two users choose the same 
79 password this entry will be identical (i.e. the password is 
80 not "salted" as the UNIX password is). 
81
82 \fBWARNING !!\fR. Note that, due to 
83 the challenge-response nature of the SMB/CIFS authentication
84 protocol, anyone with a knowledge of this password hash will 
85 be able to impersonate the user on the network. For this
86 reason these hashes are known as \fBplain text 
87 equivalents\fR and must \fBNOT\fR be made 
88 available to anyone but the root user. To protect these passwords 
89 the smbpasswd file is placed in a directory with read and 
90 traverse access only to the root user and the smbpasswd file 
91 itself must be set to be read/write only by root, with no
92 other access. 
93 .TP
94 \fBAccount Flags\fR
95 This section contains flags that describe 
96 the attributes of the users account. In the Samba 2.2 release 
97 this field is bracketed by '[' and ']' characters and is always 
98 13 characters in length (including the '[' and ']' characters).
99 The contents of this field may be any of the following characters:
100 .RS
101 .TP 0.2i
102 \(bu
103 \fBU\fR - This means 
104 this is a "User" account, i.e. an ordinary user. Only User 
105 and Workstation Trust accounts are currently supported 
106 in the smbpasswd file. 
107 .TP 0.2i
108 \(bu
109 \fBN\fR - This means the
110 account has no password (the passwords in the fields LANMAN 
111 Password Hash and NT Password Hash are ignored). Note that this 
112 will only allow users to log on with no password if the \fI   null passwords\fR parameter is set in the \fBsmb.conf\fR(5) 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 this user. 
117 .TP 0.2i
118 \(bu
119 \fBW\fR - This means this account 
120 is a "Workstation Trust" account. This kind of account is used 
121 in the Samba PDC code stream to allow Windows NT Workstations 
122 and Servers to join a Domain hosted by a Samba PDC. 
123 .RE
124
125 Other flags may be added as the code is extended in future.
126 The rest of this field space is filled in with spaces. 
127 .TP
128 \fBLast Change Time\fR
129 This field consists of the time the account was 
130 last modified. It consists of the characters 'LCT-' (standing for 
131 "Last Change Time") followed by a numeric encoding of the UNIX time 
132 in seconds since the epoch (1970) that the last change was made. 
133 .PP
134 All other colon separated fields are ignored at this time.
135 .SH "VERSION"
136 .PP
137 This man page is correct for version 3.0 of 
138 the Samba suite.
139 .SH "SEE ALSO"
140 .PP
141 \fBsmbpasswd\fR(8), \fBSamba\fR(7), and
142 the Internet RFC1321 for details on the MD4 algorithm.
143 .SH "AUTHOR"
144 .PP
145 The original Samba software and related utilities 
146 were created by Andrew Tridgell. Samba is now developed
147 by the Samba Team as an Open Source project similar 
148 to the way the Linux kernel is developed.
149 .PP
150 The original Samba man pages were written by Karl Auer. 
151 The man page sources were converted to YODL format (another 
152 excellent piece of Open Source software, available at  ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 
153 release by Jeremy Allison.  The conversion to DocBook for 
154 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2
155 for Samba 3.0 was done by Alexander Bokovoy.