source: vendor/3.6.23/docs/manpages/smbpasswd.5

Last change on this file was 860, checked in by Silvan Scherrer, 11 years ago

Samba 3.6: updated vendor to latest version

File size: 7.8 KB
Line 
1'\" t
2.\" Title: smbpasswd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5.\" Date: 09/18/2013
6.\" Manual: File Formats and Conventions
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "SMBPASSWD" "5" "09/18/2013" "Samba 3\&.6" "File Formats and Conventions"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31smbpasswd \- The Samba encrypted password file
32.SH "SYNOPSIS"
33.PP
34smbpasswd
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41smbpasswd is the Samba encrypted password file\&. It contains the username, Unix user id and the SMB hashed passwords of the user, as well as account flag information and the time the password was last changed\&. This file format has been evolving with Samba and has had several different formats in the past\&.
42.SH "FILE FORMAT"
43.PP
44The format of the smbpasswd file used by Samba 2\&.2 is very similar to the familiar Unix
45passwd(5)
46file\&. It is an ASCII file containing one line for each user\&. Each field ithin each line is separated from the next by a colon\&. Any entry beginning with \*(Aq#\*(Aq is ignored\&. The smbpasswd file contains the following information for each user:
47.PP
48name
49.RS 4
50This is the user name\&. It must be a name that already exists in the standard UNIX passwd file\&.
51.RE
52.PP
53uid
54.RS 4
55This is the UNIX uid\&. It must match the uid field for the same user entry in the standard UNIX passwd file\&. If this does not match then Samba will refuse to recognize this smbpasswd file entry as being valid for a user\&.
56.RE
57.PP
58Lanman Password Hash
59.RS 4
60This is the LANMAN hash of the user\*(Aqs password, encoded as 32 hex digits\&. The LANMAN hash is created by DES encrypting a well known string with the user\*(Aqs password as the DES key\&. This is the same password used by Windows 95/98 machines\&. Note that this password hash is regarded as weak as it is vulnerable to dictionary attacks and if two users choose the same password this entry will be identical (i\&.e\&. the password is not "salted" as the UNIX password is)\&. If the user has a null password this field will contain the characters "NO PASSWORD" as the start of the hex string\&. If the hex string is equal to 32 \*(AqX\*(Aq characters then the user\*(Aqs account is marked as
61\fBdisabled\fR
62and the user will not be able to log onto the Samba server\&.
63.sp
64\fIWARNING !!\fR
65Note that, due to the challenge\-response nature of the SMB/CIFS authentication protocol, anyone with a knowledge of this password hash will be able to impersonate the user on the network\&. For this reason these hashes are known as
66\fIplain text equivalents\fR
67and must
68\fINOT\fR
69be made available to anyone but the root user\&. To protect these passwords the smbpasswd file is placed in a directory with read and traverse access only to the root user and the smbpasswd file itself must be set to be read/write only by root, with no other access\&.
70.RE
71.PP
72NT Password Hash
73.RS 4
74This is the Windows NT hash of the user\*(Aqs password, encoded as 32 hex digits\&. The Windows NT hash is created by taking the user\*(Aqs password as represented in 16\-bit, little\-endian UNICODE and then applying the MD4 (internet rfc1321) hashing algorithm to it\&.
75.sp
76This password hash is considered more secure than the LANMAN Password Hash as it preserves the case of the password and uses a much higher quality hashing algorithm\&. However, it is still the case that if two users choose the same password this entry will be identical (i\&.e\&. the password is not "salted" as the UNIX password is)\&.
77.sp
78\fIWARNING !!\fR\&. Note that, due to the challenge\-response nature of the SMB/CIFS authentication protocol, anyone with a knowledge of this password hash will be able to impersonate the user on the network\&. For this reason these hashes are known as
79\fIplain text equivalents\fR
80and must
81\fINOT\fR
82be made available to anyone but the root user\&. To protect these passwords the smbpasswd file is placed in a directory with read and traverse access only to the root user and the smbpasswd file itself must be set to be read/write only by root, with no other access\&.
83.RE
84.PP
85Account Flags
86.RS 4
87This section contains flags that describe the attributes of the users account\&. This field is bracketed by \*(Aq[\*(Aq and \*(Aq]\*(Aq characters and is always 13 characters in length (including the \*(Aq[\*(Aq and \*(Aq]\*(Aq characters)\&. The contents of this field may be any of the following characters:
88.sp
89.RS 4
90.ie n \{\
91\h'-04'\(bu\h'+03'\c
92.\}
93.el \{\
94.sp -1
95.IP \(bu 2.3
96.\}
97\fIU\fR
98\- This means this is a "User" account, i\&.e\&. an ordinary user\&.
99.RE
100.sp
101.RS 4
102.ie n \{\
103\h'-04'\(bu\h'+03'\c
104.\}
105.el \{\
106.sp -1
107.IP \(bu 2.3
108.\}
109\fIN\fR
110\- This means the account has no password (the passwords in the fields LANMAN Password Hash and NT Password Hash are ignored)\&. Note that this will only allow users to log on with no password if the
111\fI null passwords\fR
112parameter is set in the
113\fBsmb.conf\fR(5)
114config file\&.
115.RE
116.sp
117.RS 4
118.ie n \{\
119\h'-04'\(bu\h'+03'\c
120.\}
121.el \{\
122.sp -1
123.IP \(bu 2.3
124.\}
125\fID\fR
126\- This means the account is disabled and no SMB/CIFS logins will be allowed for this user\&.
127.RE
128.sp
129.RS 4
130.ie n \{\
131\h'-04'\(bu\h'+03'\c
132.\}
133.el \{\
134.sp -1
135.IP \(bu 2.3
136.\}
137\fIX\fR
138\- This means the password does not expire\&.
139.RE
140.sp
141.RS 4
142.ie n \{\
143\h'-04'\(bu\h'+03'\c
144.\}
145.el \{\
146.sp -1
147.IP \(bu 2.3
148.\}
149\fIW\fR
150\- This means this account is a "Workstation Trust" account\&. This kind of account is used in the Samba PDC code stream to allow Windows NT Workstations and Servers to join a Domain hosted by a Samba PDC\&.
151.RE
152.sp
153.RE
154Other flags may be added as the code is extended in future\&. The rest of this field space is filled in with spaces\&. For further information regarding the flags that are supported please refer to the man page for the
155pdbedit
156command\&.
157.RE
158.PP
159Last Change Time
160.RS 4
161This field consists of the time the account was last modified\&. It consists of the characters \*(AqLCT\-\*(Aq (standing for "Last Change Time") followed by a numeric encoding of the UNIX time in seconds since the epoch (1970) that the last change was made\&.
162.RE
163.PP
164All other colon separated fields are ignored at this time\&.
165.SH "VERSION"
166.PP
167This man page is correct for version 3 of the Samba suite\&.
168.SH "SEE ALSO"
169.PP
170\fBsmbpasswd\fR(8),
171\fBSamba\fR(7), and the Internet RFC1321 for details on the MD4 algorithm\&.
172.SH "AUTHOR"
173.PP
174The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
175.PP
176The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
177ftp://ftp\&.icce\&.rug\&.nl/pub/unix/) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
Note: See TracBrowser for help on using the repository browser.