1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
28 >smbpasswd -- change a user's SMB password</DIV
30 CLASS="REFSYNOPSISDIV"
40 > [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [username]</P
50 >This tool is part of the <A
56 >The smbpasswd program has several different
57 functions, depending on whether it is run by the <SPAN
64 user or not. When run as a normal user it allows the user to change
65 the password used for their SMB sessions on any machines that store
68 >By default (when run with no arguments) it will attempt to
69 change the current user's SMB password on the local machine. This is
70 similar to the way the <B
77 > differs from how the passwd program works
78 however in that it is not <SPAN
85 a client-server mode and communicates with a locally running
89 >. As a consequence in order for this to
90 succeed the smbd daemon must be running on the local machine. On a
91 UNIX machine the encrypted SMB passwords are usually stored in
97 >When run by an ordinary user with no options, smbpasswd
98 will prompt them for their old SMB password and then ask them
99 for their new password twice, to ensure that the new password
100 was typed correctly. No passwords will be echoed on the screen
101 whilst being typed. If you have a blank SMB password (specified by
102 the string "NO PASSWORD" in the smbpasswd file) then just press
103 the <Enter> key when asked for your old password. </P
105 >smbpasswd can also be used by a normal user to change their
106 SMB password on remote machines, such as Windows NT Primary Domain
107 Controllers. See the (-r) and -U options below. </P
109 >When run by root, smbpasswd allows new users to be added
110 and deleted in the smbpasswd file, as well as allows changes to
111 the attributes of the user in this file to be made. When run by root,
115 > accesses the local smbpasswd file
116 directly, thus enabling changes to be made even if smbd is not
135 >This option specifies that the username
136 following should be added to the local smbpasswd file, with the
137 new password typed (type <Enter> for the old password). This
138 option is ignored if the username following already exists in
139 the smbpasswd file and it is treated like a regular change
140 password command. Note that the default passdb backends require
141 the user to already exist in the system password file (usually
145 >), else the request to add the
148 >This option is only available when running smbpasswd
155 >This option specifies that the username
156 following should be deleted from the local smbpasswd file.
159 >This option is only available when running smbpasswd as
166 >This option specifies that the username following
170 > in the local smbpasswd
171 file. This is done by writing a <TT
175 into the account control space in the smbpasswd file. Once this
176 is done all attempts to authenticate via SMB using this username
179 >If the smbpasswd file is in the 'old' format (pre-Samba 2.0
180 format) there is no space in the user's password entry to write
181 this information and the command will FAIL. See <B
185 > for details on the 'old' and new password file formats.
188 >This option is only available when running smbpasswd as
195 >This option specifies that the username following
199 > in the local smbpasswd file,
200 if the account was previously disabled. If the account was not
201 disabled this option has no effect. Once the account is enabled then
202 the user will be able to authenticate via SMB once again. </P
204 >If the smbpasswd file is in the 'old' format, then <B
207 > will FAIL to enable the account.
212 details on the 'old' and new password file formats. </P
214 >This option is only available when running smbpasswd as root.
227 from 0 to 10. The default value if this parameter is not specified
230 >The higher this value, the more detail will be logged to the
231 log files about the activities of smbpasswd. At level 0, only
232 critical errors and serious warnings will be logged. </P
234 >Levels above 1 will generate considerable amounts of log
235 data, and should only be used when investigating a problem. Levels
236 above 3 are designed for use only by developers and generate
237 HUGE amounts of log data, most of which is extremely cryptic.
244 >This option specifies that the username following
245 should have their password set to null (i.e. a blank password) in
246 the local smbpasswd file. This is done by writing the string "NO
247 PASSWORD" as the first part of the first password stored in the
250 >Note that to allow users to logon to a Samba server once
251 the password has been set to "NO PASSWORD" in the smbpasswd
252 file the administrator must set the following parameter in the [global]
260 >null passwords = yes</B
263 >This option is only available when running smbpasswd as
267 >-r remote machine name</DT
270 >This option allows a user to specify what machine
271 they wish to change their password on. Without this parameter
272 smbpasswd defaults to the local host. The <TT
278 > is the NetBIOS name of the SMB/CIFS
279 server to contact to attempt the password change. This name is
280 resolved into an IP address using the standard name resolution
281 mechanism in all programs of the Samba suite. See the <TT
285 name resolve order</I
287 > parameter for details on changing
288 this resolving mechanism. </P
290 >The username whose password is changed is that of the
291 current UNIX logged on user. See the <TT
297 parameter for details on changing the password for a different
300 >Note that if changing a Windows NT Domain password the
301 remote machine specified must be the Primary Domain Controller for
302 the domain (Backup Domain Controllers only have a read-only
303 copy of the user account database and will not allow the password
312 > that Windows 95/98 do not have
313 a real password database so it is not possible to change passwords
314 specifying a Win95/98 machine as remote machine target. </P
317 >-R name resolve order</DT
320 >This option allows the user of smbpasswd to determine
321 what name resolution services to use when looking up the NetBIOS
322 name of the host being connected to. </P
324 >The options are :"lmhosts", "host", "wins" and "bcast". They
325 cause names to be resolved as follows : </P
335 address in the Samba lmhosts file. If the line in lmhosts has
336 no name type attached to the NetBIOS name (see the <A
337 HREF="lmhosts.5.html"
341 any name type matches for lookup.</P
348 > : Do a standard host
349 name to IP address resolution, using the system <TT
353 >, NIS, or DNS lookups. This method of name resolution
354 is operating system depended for instance on IRIX or Solaris this
355 may be controlled by the <TT
357 >/etc/nsswitch.conf</TT
359 file). Note that this method is only used if the NetBIOS name
360 type being queried is the 0x20 (server) name type, otherwise
368 > : Query a name with
369 the IP address listed in the <TT
375 parameter. If no WINS server has been specified this method
383 > : Do a broadcast on
384 each of the known local interfaces listed in the
390 > parameter. This is the least
391 reliable of the name resolution methods as it depends on the
392 target host being on a locally connected subnet.</P
396 >The default order is <B
398 >lmhosts, host, wins, bcast</B
400 and without this parameter or any entry in the
404 > file the name resolution methods will
405 be attempted in this order. </P
411 >This option tells smbpasswd that the account
412 being changed is a MACHINE account. Currently this is used
413 when Samba is being used as an NT Primary Domain Controller.</P
415 >This option is only available when running smbpasswd as root.
422 >This option may only be used in conjunction
428 > option. When changing
429 a password on a remote machine it allows the user to specify
430 the user name on that machine whose password will be changed. It
431 is present to allow users who have different user names on
432 different systems to change these passwords. </P
438 >This option prints the help string for <B
441 >, selecting the correct one for running as root
442 or as an ordinary user. </P
448 >This option causes smbpasswd to be silent (i.e.
449 not issue prompts) and to read its old and new passwords from
450 standard input, rather than from <TT
457 > program does). This option
458 is to aid people writing scripts to drive smbpasswd</P
464 >This parameter is only available if Samba
465 has been configured to use the experimental
475 switch is used to specify the password to be used with the
477 HREF="smb.conf.5.html#LDAPADMINDN"
486 >. Note that the password is stored in
489 >private/secrets.tdb</TT
491 of the admin's DN. This means that if the value of <TT
497 > ever changes, the password will need to be
498 manually updated as well.
505 >This specifies the username for all of the
512 > options to operate on. Only root
513 can specify this parameter as only root has the permission needed
514 to modify attributes directly in the local smbpasswd file.
531 > works in client-server
532 mode communicating with a local smbd for a non-root user then
533 the smbd daemon must be running for this to work. A common problem
534 is to add a restriction to the hosts that may access the <B
537 > running on the local machine by specifying a
552 > file and neglecting to
553 allow "localhost" access to the smbd. </P
555 >In addition, the smbpasswd command is only useful if Samba
556 has been set up to use encrypted passwords. See the file
560 > in the docs directory for details
561 on how to do this. </P
571 >This man page is correct for version 3.0 of
583 HREF="smbpasswd.5.html"
605 >The original Samba software and related utilities
606 were created by Andrew Tridgell. Samba is now developed
607 by the Samba Team as an Open Source project similar
608 to the way the Linux kernel is developed.</P
610 >The original Samba man pages were written by Karl Auer.
611 The man page sources were converted to YODL format (another
612 excellent piece of Open Source software, available at
614 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
616 > ftp://ftp.icce.rug.nl/pub/unix/</A
617 >) and updated for the Samba 2.0
618 release by Jeremy Allison. The conversion to DocBook for
619 Samba 2.2 was done by Gerald Carter</P