1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN">
8 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
19 NAME=
"SMBPASSWD">smbpasswd
</H1
27 >smbpasswd
--
change a user's SMB password
</DIV
29 CLASS=
"REFSYNOPSISDIV"
37 > [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r
<remote machine
>] [-R
<name resolve order
>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [-i] [-L] [username]
</P
47 >This tool is part of the
<A
53 >The smbpasswd program has several different
54 functions, depending on whether it is run by the
<I
58 user or not. When run as a normal user it allows the user to change
59 the password used for their SMB sessions on any machines that store
62 >By default (when run with no arguments) it will attempt to
63 change the current user's SMB password on the local machine. This is
64 similar to the way the
<B
71 > differs from how the passwd program works
72 however in that it is not
<I
76 a client-server mode and communicates with a locally running
80 >. As a consequence in order for this to
81 succeed the smbd daemon must be running on the local machine. On a
82 UNIX machine the encrypted SMB passwords are usually stored in
88 >When run by an ordinary user with no options, smbpasswd
89 will prompt them for their old SMB password and then ask them
90 for their new password twice, to ensure that the new password
91 was typed correctly. No passwords will be echoed on the screen
92 whilst being typed. If you have a blank SMB password (specified by
93 the string
"NO PASSWORD" in the smbpasswd file) then just press
94 the
<Enter
> key when asked for your old password.
</P
96 >smbpasswd can also be used by a normal user to change their
97 SMB password on remote machines, such as Windows NT Primary Domain
98 Controllers. See the (-r) and -U options below.
</P
100 >When run by root, smbpasswd allows new users to be added
101 and deleted in the smbpasswd file, as well as allows changes to
102 the attributes of the user in this file to be made. When run by root,
106 > accesses the local smbpasswd file
107 directly, thus enabling changes to be made even if smbd is not
126 >This option specifies that the username
127 following should be added to the local smbpasswd file, with the
128 new password typed (type
<Enter
> for the old password). This
129 option is ignored if the username following already exists in
130 the smbpasswd file and it is treated like a regular change
131 password command. Note that the default passdb backends require
132 the user to already exist in the system password file (usually
136 >), else the request to add the
139 >This option is only available when running smbpasswd
146 >This option specifies that the username
147 following should be deleted from the local smbpasswd file.
150 >This option is only available when running smbpasswd as
157 >This option specifies that the username following
161 > in the local smbpasswd
162 file. This is done by writing a
<TT
166 into the account control space in the smbpasswd file. Once this
167 is done all attempts to authenticate via SMB using this username
170 >If the smbpasswd file is in the 'old' format (pre-Samba
2.0
171 format) there is no space in the user's password entry to write
172 this information and the command will FAIL. See
<B
176 > for details on the 'old' and new password file formats.
179 >This option is only available when running smbpasswd as
186 >This option specifies that the username following
190 > in the local smbpasswd file,
191 if the account was previously disabled. If the account was not
192 disabled this option has no effect. Once the account is enabled then
193 the user will be able to authenticate via SMB once again.
</P
195 >If the smbpasswd file is in the 'old' format, then
<B
198 > will FAIL to enable the account.
203 details on the 'old' and new password file formats.
</P
205 >This option is only available when running smbpasswd as root.
218 from
0 to
10. The default value if this parameter is not specified
221 >The higher this value, the more detail will be logged to the
222 log files about the activities of smbpasswd. At level
0, only
223 critical errors and serious warnings will be logged.
</P
225 >Levels above
1 will generate considerable amounts of log
226 data, and should only be used when investigating a problem. Levels
227 above
3 are designed for use only by developers and generate
228 HUGE amounts of log data, most of which is extremely cryptic.
235 >This option specifies that the username following
236 should have their password set to null (i.e. a blank password) in
237 the local smbpasswd file. This is done by writing the string
"NO
238 PASSWORD" as the first part of the first password stored in the
241 >Note that to allow users to logon to a Samba server once
242 the password has been set to
"NO PASSWORD" in the smbpasswd
243 file the administrator must set the following parameter in the [global]
251 >null passwords = yes
</B
254 >This option is only available when running smbpasswd as
258 >-r remote machine name
</DT
261 >This option allows a user to specify what machine
262 they wish to change their password on. Without this parameter
263 smbpasswd defaults to the local host. The
<TT
269 > is the NetBIOS name of the SMB/CIFS
270 server to contact to attempt the password change. This name is
271 resolved into an IP address using the standard name resolution
272 mechanism in all programs of the Samba suite. See the
<TT
276 name resolve order
</I
278 > parameter for details on changing
279 this resolving mechanism.
</P
281 >The username whose password is changed is that of the
282 current UNIX logged on user. See the
<TT
288 parameter for details on changing the password for a different
291 >Note that if changing a Windows NT Domain password the
292 remote machine specified must be the Primary Domain Controller for
293 the domain (Backup Domain Controllers only have a read-only
294 copy of the user account database and will not allow the password
300 > that Windows
95/
98 do not have
301 a real password database so it is not possible to change passwords
302 specifying a Win95/
98 machine as remote machine target.
</P
305 >-R name resolve order
</DT
308 >This option allows the user of smbpasswd to determine
309 what name resolution services to use when looking up the NetBIOS
310 name of the host being connected to.
</P
312 >The options are :
"lmhosts",
"host",
"wins" and
"bcast". They
313 cause names to be resolved as follows :
</P
323 address in the Samba lmhosts file. If the line in lmhosts has
324 no name type attached to the NetBIOS name (see the
<A
325 HREF=
"lmhosts.5.html"
329 any name type matches for lookup.
</P
336 > : Do a standard host
337 name to IP address resolution, using the system
<TT
341 >, NIS, or DNS lookups. This method of name resolution
342 is operating system depended for instance on IRIX or Solaris this
343 may be controlled by the
<TT
345 >/etc/nsswitch.conf
</TT
347 file). Note that this method is only used if the NetBIOS name
348 type being queried is the
0x20 (server) name type, otherwise
356 > : Query a name with
357 the IP address listed in the
<TT
363 parameter. If no WINS server has been specified this method
371 > : Do a broadcast on
372 each of the known local interfaces listed in the
378 > parameter. This is the least
379 reliable of the name resolution methods as it depends on the
380 target host being on a locally connected subnet.
</P
384 >The default order is
<B
386 >lmhosts, host, wins, bcast
</B
388 and without this parameter or any entry in the
392 > file the name resolution methods will
393 be attempted in this order.
</P
399 >This option tells smbpasswd that the account
400 being changed is a MACHINE account. Currently this is used
401 when Samba is being used as an NT Primary Domain Controller.
</P
403 >This option is only available when running smbpasswd as root.
410 >This option may only be used in conjunction
416 > option. When changing
417 a password on a remote machine it allows the user to specify
418 the user name on that machine whose password will be changed. It
419 is present to allow users who have different user names on
420 different systems to change these passwords.
</P
426 >This option prints the help string for
<B
429 >, selecting the correct one for running as root
430 or as an ordinary user.
</P
436 >This option causes smbpasswd to be silent (i.e.
437 not issue prompts) and to read its old and new passwords from
438 standard input, rather than from
<TT
445 > program does). This option
446 is to aid people writing scripts to drive smbpasswd
</P
452 >This parameter is only available if Samba
453 has been configured to use the experimental
463 switch is used to specify the password to be used with the
465 HREF=
"smb.conf.5.html#LDAPADMINDN"
474 >. Note that the password is stored in
477 >private/secrets.tdb
</TT
479 of the admin's DN. This means that if the value of
<TT
485 > ever changes, the password will need to be
486 manually updated as well.
493 >This option tells smbpasswd that the account
494 being changed is an interdomain trust account. Currently this is used
495 when Samba is being used as an NT Primary Domain Controller.
496 The account contains the info about another trusted domain.
</P
498 >This option is only available when running smbpasswd as root.
505 >Run in local mode.
</P
511 >This specifies the username for all of the
515 > options to operate on. Only root
516 can specify this parameter as only root has the permission needed
517 to modify attributes directly in the local smbpasswd file.
534 > works in client-server
535 mode communicating with a local smbd for a non-root user then
536 the smbd daemon must be running for this to work. A common problem
537 is to add a restriction to the hosts that may access the
<B
540 > running on the local machine by specifying a
555 > file and neglecting to
556 allow
"localhost" access to the smbd.
</P
558 >In addition, the smbpasswd command is only useful if Samba
559 has been set up to use encrypted passwords. See the file
563 > in the docs directory for details
564 on how to do this.
</P
574 >This man page is correct for version
3.0 of
586 HREF=
"smbpasswd.5.html"
608 >The original Samba software and related utilities
609 were created by Andrew Tridgell. Samba is now developed
610 by the Samba Team as an Open Source project similar
611 to the way the Linux kernel is developed.
</P
613 >The original Samba man pages were written by Karl Auer.
614 The man page sources were converted to YODL format (another
615 excellent piece of Open Source software, available at
617 HREF=
"ftp://ftp.icce.rug.nl/pub/unix/"
619 > ftp://ftp.icce.rug.nl/pub/unix/
</A
620 >) and updated for the Samba
2.0
621 release by Jeremy Allison. The conversion to DocBook for
622 Samba
2.2 was done by Gerald Carter
</P