1 .TH SMBPASSWD 8 "19 Mar 2000" "smbpasswd TNG-prealpha"
4 smbpasswd \- change a users SMB password
8 \fBsmbpasswd\fP [-a] [-d] [-e] [-D debug level] [-n] [-r remote_machine] [-R name resolve order] [-m] [-j DOMAIN] [-U username] [-h] [-s] username
12 This program is part of the \fBSamba\fP suite\&.
14 The \fBsmbpasswd\fP program has several different functions, depending
15 on whether it is run by the \fIroot\fP user or not\&. When run as a normal
16 user it allows the user to change the password used for their SMB
17 sessions on any machines that store SMB passwords\&.
19 By default (when run with no arguments) it will attempt to change the
20 current users SMB password on the local machine\&. This is similar to
21 the way the \fBpasswd (1)\fP program works\&. \fBsmbpasswd\fP differs from how
22 the \fBpasswd\fP program works however in that it is not \fIsetuid root\fP
23 but works in a client-server mode and communicates with a locally
24 running \fBsmbd\fP\&. As a consequence in order for this
25 to succeed the \fBsmbd\fP daemon must be running on
26 the local machine\&. On a UNIX machine the encrypted SMB passwords are
27 usually stored in the \fBsmbpasswd (5)\fP file\&.
29 When run by an ordinary user with no options\&. \fBsmbpasswd\fP will
30 prompt them for their old smb password and then ask them for their new
31 password twice, to ensure that the new password was typed
32 correctly\&. No passwords will be echoed on the screen whilst being
33 typed\&. If you have a blank smb password (specified by the string "NO
34 PASSWORD" in the \fBsmbpasswd\fP file) then just
35 press the <Enter> key when asked for your old password\&.
37 \fBsmbpasswd\fP can also be used by a normal user to change their SMB
38 password on remote machines, such as Windows NT Primary Domain
39 Controllers\&. See the (\fB-r\fP) and
40 \fB-U\fP options below\&.
42 When run by root, \fBsmbpasswd\fP allows new users to be added and
43 deleted in the \fBsmbpasswd\fP file, as well as
44 allows changes to the attributes of the user in this file to be made\&. When
45 run by root, \fBsmbpasswd\fP accesses the local
46 \fBsmbpasswd\fP file directly, thus enabling
47 changes to be made even if \fBsmbd\fP is not running\&.
53 This option specifies that the username following should
54 be added to the local \fBsmbpasswd\fP file, with
55 the new password typed (type <Enter> for the old password)\&. This
56 option is ignored if the username following already exists in the
57 \fBsmbpasswd\fP file and it is treated like a
58 regular change password command\&. Note that the user to be added
59 \fBmust\fP already exist in the system password file (usually /etc/passwd)
60 else the request to add the user will fail\&.
62 This option is only available when running \fBsmbpasswd\fP as
66 This option specifies that the username following should be
67 \fIdisabled\fP in the local \fBsmbpasswd\fP file\&.
68 This is done by writing a \fI\'D\'\fP flag into the account control space
69 in the \fBsmbpasswd\fP file\&. Once this is done
70 all attempts to authenticate via SMB using this username will fail\&.
72 If the \fBsmbpasswd\fP file is in the \'old\'
73 format (pre-Samba 2\&.0 format) there is no space in the users password
74 entry to write this information and so the user is disabled by writing
75 \'X\' characters into the password space in the
76 \fBsmbpasswd\fP file\&. See \fBsmbpasswd
77 (5)\fP for details on the \'old\' and new password file
80 This option is only available when running \fBsmbpasswd\fP as root\&.
83 This option specifies that the username following should be
84 \fIenabled\fP in the local \fBsmbpasswd\fP file,
85 if the account was previously disabled\&. If the account was not
86 disabled this option has no effect\&. Once the account is enabled
87 then the user will be able to authenticate via SMB once again\&.
89 If the smbpasswd file is in the \'old\' format then \fBsmbpasswd\fP will
90 prompt for a new password for this user, otherwise the account will be
91 enabled by removing the \fI\'D\'\fP flag from account control space in the
92 \fBsmbpasswd\fP file\&. See \fBsmbpasswd
93 (5)\fP for details on the \'old\' and new password file
96 This option is only available when running \fBsmbpasswd\fP as root\&.
98 .IP "\fB-D debuglevel\fP"
99 debuglevel is an integer from 0
100 to 10\&. The default value if this parameter is not specified is zero\&.
102 The higher this value, the more detail will be logged to the log files
103 about the activities of smbpasswd\&. At level 0, only critical errors
104 and serious warnings will be logged\&.
106 Levels above 1 will generate considerable amounts of log data, and
107 should only be used when investigating a problem\&. Levels above 3 are
108 designed for use only by developers and generate HUGE amounts of log
109 data, most of which is extremely cryptic\&.
112 This option specifies that the username following should
113 have their password set to null (i\&.e\&. a blank password) in the local
114 \fBsmbpasswd\fP file\&. This is done by writing the
115 string "NO PASSWORD" as the first part of the first password stored in
116 the \fBsmbpasswd\fP file\&.
118 Note that to allow users to logon to a Samba server once the password
119 has been set to "NO PASSWORD" in the
120 \fBsmbpasswd\fP file the administrator must set
121 the following parameter in the [global] section of the
122 \fBsmb\&.conf\fP file :
124 null passwords = true
126 This option is only available when running \fBsmbpasswd\fP as root\&.
128 .IP "\fB-r remote machine name\fP"
130 user to specify what machine they wish to change their password
131 on\&. Without this parameter \fBsmbpasswd\fP defaults to the local
132 host\&. The \fI"remote machine name"\fP is the NetBIOS name of the
133 SMB/CIFS server to contact to attempt the password change\&. This name
134 is resolved into an IP address using the standard name resolution
135 mechanism in all programs of the \fBSamba\fP
136 suite\&. See the \fB-R name resolve order\fP parameter for details on changing this resolving
139 The username whose password is changed is that of the current UNIX
140 logged on user\&. See the \fB-U username\fP
141 parameter for details on changing the password for a different
144 Note that if changing a Windows NT Domain password the remote machine
145 specified must be the Primary Domain Controller for the domain (Backup
146 Domain Controllers only have a read-only copy of the user account
147 database and will not allow the password change)\&.
149 \fINote\fP that Windows 95/98 do not have a real password database
150 so it is not possible to change passwords specifying a Win95/98
151 machine as remote machine target\&.
153 .IP "\fB-R name resolve order\fP"
154 This option allows the user of
155 smbclient to determine what name resolution services to use when
156 looking up the NetBIOS name of the host being connected to\&.
158 The options are :"lmhosts", "host",
159 "wins" and "bcast"\&. They cause names to be
160 resolved as follows :
164 \fBlmhosts\fP : Lookup an IP address in the Samba lmhosts file\&.
167 \fBhost\fP : Do a standard host name to IP address resolution,
168 using the system /etc/hosts, NIS, or DNS lookups\&. This method of name
169 resolution is operating system dependent\&. For instance on IRIX or
170 Solaris, this may be controlled by the \fI/etc/nsswitch\&.conf\fP file)\&.
173 \fBwins\fP : Query a name with the IP address listed in the
174 \fBwins server\fP parameter in the
175 \fBsmb\&.conf file\fP\&. If
176 no WINS server has been specified this method will be ignored\&.
179 \fBbcast\fP : Do a broadcast on each of the known local interfaces
180 listed in the \fBinterfaces\fP parameter
181 in the smb\&.conf file\&. This is the least reliable of the name resolution
182 methods as it depends on the target host being on a locally connected
186 If this parameter is not set then the name resolve order defined
187 in the \fBsmb\&.conf\fP file parameter
188 \fBname resolve order\fP
191 The default order is lmhosts, host, wins, bcast and without this
192 parameter or any entry in the \fBsmb\&.conf\fP
193 file the name resolution methods will be attempted in this order\&.
196 This option tells \fBsmbpasswd\fP that the account being
197 changed is a \fIMACHINE\fP account\&. Currently this is used when Samba is
198 being used as an NT Primary Domain Controller\&. PDC support is not a
199 supported feature in Samba2\&.0 but will become supported in a later
200 release\&. If you wish to know more about using Samba as an NT PDC then
201 please subscribe to the mailing list
202 \fIsamba-ntdom@samba\&.org\fP\&.
204 This option is only available when running \fBsmbpasswd\fP as root\&.
206 .IP "\fB-j DOMAIN\fP"
207 This option is used to add a Samba server into a
208 Windows NT Domain, as a Domain member capable of authenticating user
209 accounts to any Domain Controller in the same way as a Windows NT
210 Server\&. See the \fBsecurity=domain\fP
211 option in the \fBsmb\&.conf (5)\fP man page\&.
213 In order to be used in this way, the Administrator for the Windows
214 NT Domain must have used the program \fI"Server Manager for Domains"\fP
215 to add the primary NetBIOS name of
216 the Samba server as a member of the Domain\&.
218 After this has been done, to join the Domain invoke \fBsmbpasswd\fP with
219 this parameter\&. \fBsmbpasswd\fP will then look up the Primary Domain
220 Controller for the Domain (found in the
221 \fBsmb\&.conf\fP file in the parameter
222 \fBpassword server\fP and change
223 the machine account password used to create the secure Domain
224 communication\&. This password is then stored by \fBsmbpasswd\fP in a
225 file, read only by root, called \f(CW<Domain>\&.<Machine>\&.mac\fP where
226 \f(CW<Domain>\fP is the name of the Domain we are joining and \f(CW<Machine>\fP
227 is the primary NetBIOS name of the machine we are running on\&.
229 Once this operation has been performed the
230 \fBsmb\&.conf\fP file may be updated to set the
231 \fBsecurity=domain\fP option and all
232 future logins to the Samba server will be authenticated to the Windows
235 Note that even though the authentication is being done to the PDC all
236 users accessing the Samba server must still have a valid UNIX account
239 This option is only available when running \fBsmbpasswd\fP as root\&.
241 .IP "\fB-U username\fP"
242 This option may only be used in
243 conjunction with the \fB-r\fP
244 option\&. When changing a password on a remote machine it allows the
245 user to specify the user name on that machine whose password will be
246 changed\&. It is present to allow users who have different user names on
247 different systems to change these passwords\&.
250 This option prints the help string for \fBsmbpasswd\fP,
251 selecting the correct one for running as root or as an ordinary user\&.
254 This option causes \fBsmbpasswd\fP to be silent (i\&.e\&. not
255 issue prompts) and to read it\'s old and new passwords from standard
256 input, rather than from \f(CW/dev/tty\fP (like the \fBpasswd (1)\fP program
257 does)\&. This option is to aid people writing scripts to drive \fBsmbpasswd\fP
260 This specifies the username for all of the \fIroot
261 only\fP options to operate on\&. Only root can specify this parameter as
262 only root has the permission needed to modify attributes directly
263 in the local \fBsmbpasswd\fP file\&.
267 Since \fBsmbpasswd\fP works in client-server mode communicating with a
268 local \fBsmbd\fP for a non-root user then the \fBsmbd\fP
269 daemon must be running for this to work\&. A common problem is to add a
270 restriction to the hosts that may access the \fBsmbd\fP running on the
271 local machine by specifying a \fB"allow
272 hosts"\fP or \fB"deny
273 hosts"\fP entry in the
274 \fBsmb\&.conf\fP file and neglecting to allow
275 \fI"localhost"\fP access to the \fBsmbd\fP\&.
277 In addition, the \fBsmbpasswd\fP command is only useful if \fBSamba\fP has
278 been set up to use encrypted passwords\&. See the file \fBENCRYPTION\&.txt\fP
279 in the docs directory for details on how to do this\&.
283 This man page is correct for version 2\&.0 of the Samba suite\&.
287 The original Samba software and related utilities were created by
288 Andrew Tridgell \fIsamba-bugs@samba\&.org\fP\&. Samba is now developed
289 by the Samba Team as an Open Source project similar to the way the
290 Linux kernel is developed\&.
292 The original Samba man pages were written by Karl Auer\&. The man page
293 sources were converted to YODL format (another excellent piece of Open
294 Source software, available at
295 \fBftp://ftp\&.icce\&.rug\&.nl/pub/unix/\fP)
296 and updated for the Samba2\&.0 release by Jeremy Allison\&.
297 \fIsamba-bugs@samba\&.org\fP\&.
299 See \fBsamba (7)\fP to find out how to get a full
300 list of contributors and details on how to submit bug reports,