7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.57"></HEAD
27 >smbpasswd
--
change a users SMB password
</DIV
29 CLASS=
"REFSYNOPSISDIV"
39 > [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r
<remote machine
>] [-R
<name resolve order
>] [-m] [-j DOMAIN] [-U username] [-h] [-s] [username]
</P
49 >This tool is part of the
<A
55 >The smbpasswd program has several different
56 functions, depending on whether it is run by the
<EM
59 user or not. When run as a normal user it allows the user to change
60 the password used for their SMB sessions on any machines that store
63 >By default (when run with no arguments) it will attempt to
64 change the current users SMB password on the local machine. This is
65 similar to the way the
<B
72 > differs from how the passwd program works
73 however in that it is not
<EM
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 user to be added must already exist
132 in the system password file (usually
<TT
136 else the request to add the user will fail.
</P
138 >This option is only available when running smbpasswd
145 >This option specifies that the username
146 following should be deleted from the local smbpasswd file.
149 >This option is only available when running smbpasswd as
156 >This option specifies that the username following
160 > in the local smbpasswd
161 file. This is done by writing a
<TT
165 into the account control space in the smbpasswd file. Once this
166 is done all attempts to authenticate via SMB using this username
169 >If the smbpasswd file is in the 'old' format (pre-Samba
2.0
170 format) there is no space in the users password entry to write
171 this information and so the user is disabled by writing 'X' characters
172 into the password space in the smbpasswd file. 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 prompt for a new password for this user,
199 otherwise the account will be enabled by removing the
<TT
203 > flag from account control space in the
<TT
210 details on the 'old' and new password file formats.
</P
212 >This option is only available when running smbpasswd as root.
225 from
0 to
10. The default value if this parameter is not specified
228 >The higher this value, the more detail will be logged to the
229 log files about the activities of smbpasswd. At level
0, only
230 critical errors and serious warnings will be logged.
</P
232 >Levels above
1 will generate considerable amounts of log
233 data, and should only be used when investigating a problem. Levels
234 above
3 are designed for use only by developers and generate
235 HUGE amounts of log data, most of which is extremely cryptic.
242 >This option specifies that the username following
243 should have their password set to null (i.e. a blank password) in
244 the local smbpasswd file. This is done by writing the string
"NO
245 PASSWORD" as the first part of the first password stored in the
248 >Note that to allow users to logon to a Samba server once
249 the password has been set to
"NO PASSWORD" in the smbpasswd
250 file the administrator must set the following parameter in the [global]
258 >null passwords = yes
</B
261 >This option is only available when running smbpasswd as
265 >-r remote machine name
</DT
268 >This option allows a user to specify what machine
269 they wish to change their password on. Without this parameter
270 smbpasswd defaults to the local host. The
<TT
276 > is the NetBIOS name of the SMB/CIFS
277 server to contact to attempt the password change. This name is
278 resolved into an IP address using the standard name resolution
279 mechanism in all programs of the Samba suite. See the
<TT
283 name resolve order
</I
285 > parameter for details on changing
286 this resolving mechanism.
</P
288 >The username whose password is changed is that of the
289 current UNIX logged on user. See the
<TT
295 parameter for details on changing the password for a different
298 >Note that if changing a Windows NT Domain password the
299 remote machine specified must be the Primary Domain Controller for
300 the domain (Backup Domain Controllers only have a read-only
301 copy of the user account database and will not allow the password
306 > that Windows
95/
98 do not have
307 a real password database so it is not possible to change passwords
308 specifying a Win95/
98 machine as remote machine target.
</P
311 >-R name resolve order
</DT
314 >This option allows the user of smbpasswd to determine
315 what name resolution services to use when looking up the NetBIOS
316 name of the host being connected to.
</P
318 >The options are :
"lmhosts",
"host",
"wins" and
"bcast". They cause
319 names to be resolved as follows :
</P
329 address in the Samba lmhosts file. If the line in lmhosts has
330 no name type attached to the NetBIOS name (see the
<A
331 HREF=
"lmhosts.5.html"
335 any name type matches for lookup.
</P
342 > : Do a standard host
343 name to IP address resolution, using the system
<TT
347 >, NIS, or DNS lookups. This method of name resolution
348 is operating system depended for instance on IRIX or Solaris this
349 may be controlled by the
<TT
351 >/etc/nsswitch.conf
</TT
353 file). Note that this method is only used if the NetBIOS name
354 type being queried is the
0x20 (server) name type, otherwise
362 > : Query a name with
363 the IP address listed in the
<TT
369 parameter. If no WINS server has been specified this method
377 > : Do a broadcast on
378 each of the known local interfaces listed in the
384 > parameter. This is the least
385 reliable of the name resolution methods as it depends on the
386 target host being on a locally connected subnet.
</P
390 >The default order is
<B
392 >lmhosts, host, wins, bcast
</B
394 and without this parameter or any entry in the
398 > file the name resolution methods will
399 be attempted in this order.
</P
405 >This option tells smbpasswd that the account
406 being changed is a MACHINE account. Currently this is used
407 when Samba is being used as an NT Primary Domain Controller.
</P
409 >This option is only available when running smbpasswd as root.
416 >This option is used to add a Samba server
417 into a Windows NT Domain, as a Domain member capable of authenticating
418 user accounts to any Domain Controller in the same way as a Windows
419 NT Server. See the
<B
421 >security = domain
</B
428 >In order to be used in this way, the Administrator for
429 the Windows NT Domain must have used the program
"Server Manager
430 for Domains" to add the primary NetBIOS name of the Samba server
431 as a member of the Domain.
</P
433 >After this has been done, to join the Domain invoke
<B
436 > with this parameter. smbpasswd will then
437 look up the Primary Domain Controller for the Domain (found in
441 > file in the parameter
447 > and change the machine account
448 password used to create the secure Domain communication. This
449 password is then stored by smbpasswd in a TDB, writeable only by root,
455 >Once this operation has been performed the
<TT
458 > file may be updated to set the
<B
460 > security = domain
</B
461 > option and all future logins
462 to the Samba server will be authenticated to the Windows NT
465 >Note that even though the authentication is being
466 done to the PDC all users accessing the Samba server must still
467 have a valid UNIX account on that machine.
</P
469 >This option is only available when running smbpasswd as root.
476 >This option may only be used in conjunction
482 > option. When changing
483 a password on a remote machine it allows the user to specify
484 the user name on that machine whose password will be changed. It
485 is present to allow users who have different user names on
486 different systems to change these passwords.
</P
492 >This option prints the help string for
<B
495 >, selecting the correct one for running as root
496 or as an ordinary user.
</P
502 >This option causes smbpasswd to be silent (i.e.
503 not issue prompts) and to read it's old and new passwords from
504 standard input, rather than from
<TT
511 > program does). This option
512 is to aid people writing scripts to drive smbpasswd
</P
518 >This specifies the username for all of the
521 > options to operate on. Only root
522 can specify this parameter as only root has the permission needed
523 to modify attributes directly in the local smbpasswd file.
540 > works in client-server
541 mode communicating with a local smbd for a non-root user then
542 the smbd daemon must be running for this to work. A common problem
543 is to add a restriction to the hosts that may access the
<B
546 > running on the local machine by specifying a
561 > file and neglecting to
562 allow
"localhost" access to the smbd.
</P
564 >In addition, the smbpasswd command is only useful if Samba
565 has been set up to use encrypted passwords. See the file
569 > in the docs directory for details
570 on how to do this.
</P
580 >This man page is correct for version
2.2 of
592 HREF=
"smbpasswd.5.html"
614 >The original Samba software and related utilities
615 were created by Andrew Tridgell. Samba is now developed
616 by the Samba Team as an Open Source project similar
617 to the way the Linux kernel is developed.
</P
619 >The original Samba man pages were written by Karl Auer.
620 The man page sources were converted to YODL format (another
621 excellent piece of Open Source software, available at
623 HREF=
"ftp://ftp.icce.rug.nl/pub/unix/"
625 > ftp://ftp.icce.rug.nl/pub/unix/
</A
626 >) and updated for the Samba
2.0
627 release by Jeremy Allison. The conversion to DocBook for
628 Samba
2.2 was done by Gerald Carter
</P