source: branches/samba-3.0/docs/manpages/smbpasswd.8@ 125

Last change on this file since 125 was 44, checked in by Paul Smedley, 18 years ago

Update source to 3.0.25b

File size: 12.2 KB
Line 
1.\"Generated by db2man.xsl. Don't modify this, modify the source.
2.de Sh \" Subsection
3.br
4.if t .Sp
5.ne 5
6.PP
7\fB\\$1\fR
8.PP
9..
10.de Sp \" Vertical space (when we can't use .PP)
11.if t .sp .5v
12.if n .sp
13..
14.de Ip \" List item
15.br
16.ie \\n(.$>=3 .ne \\$3
17.el .ne 3
18.IP "\\$1" \\$2
19..
20.TH "SMBPASSWD" 8 "" "" ""
21.SH "NAME"
22smbpasswd - change a user's SMB password
23.SH "SYNOPSIS"
24.HP 1
25smbpasswd [-a] [-c <config file>] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [-W] [-i] [-L] [username]
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite.
31.PP
32The smbpasswd program has several different functions, depending on whether it is run by the
33\fBroot\fR
34user or not. When run as a normal user it allows the user to change the password used for their SMB sessions on any machines that store SMB passwords.
35.PP
36By default (when run with no arguments) it will attempt to change the current user's SMB password on the local machine. This is similar to the way the
37passwd(1)
38program works.
39smbpasswd
40differs from how the passwd program works however in that it is not
41\fBsetuid root\fR
42but works in a client-server mode and communicates with a locally running
43\fBsmbd\fR(8). As a consequence in order for this to succeed the smbd daemon must be running on the local machine. On a UNIX machine the encrypted SMB passwords are usually stored in the
44\fBsmbpasswd\fR(5)
45file.
46.PP
47When run by an ordinary user with no options, smbpasswd will prompt them for their old SMB password and then ask them for their new password twice, to ensure that the new password was typed correctly. No passwords will be echoed on the screen whilst being typed. If you have a blank SMB password (specified by the string "NO PASSWORD" in the smbpasswd file) then just press the <Enter> key when asked for your old password.
48.PP
49smbpasswd can also be used by a normal user to change their SMB password on remote machines, such as Windows NT Primary Domain Controllers. See the (\fI-r\fR) and
50\fI-U\fR
51options below.
52.PP
53When run by root, smbpasswd allows new users to be added and deleted in the smbpasswd file, as well as allows changes to the attributes of the user in this file to be made. When run by root,
54smbpasswd
55accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running.
56.SH "OPTIONS"
57.PP
58-a
59.RS 3n
60This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type <Enter> for the old password). This option is ignored if the username following already exists in the smbpasswd file and it is treated like a regular change password command. Note that the default passdb backends require the user to already exist in the system password file (usually
61\fI/etc/passwd\fR), else the request to add the user will fail.
62.sp
63This option is only available when running smbpasswd as root.
64.RE
65.PP
66-c
67.RS 3n
68This option can be used to specify the path and file name of the
69\fIsmb.conf\fR
70configuration file when it is important to use other than the default file and / or location.
71.RE
72.PP
73-x
74.RS 3n
75This option specifies that the username following should be deleted from the local smbpasswd file.
76.sp
77This option is only available when running smbpasswd as root.
78.RE
79.PP
80-d
81.RS 3n
82This option specifies that the username following should be
83\fBdisabled\fR
84in the local smbpasswd file. This is done by writing a
85\fB'D'\fR
86flag into the account control space in the smbpasswd file. Once this is done all attempts to authenticate via SMB using this username will fail.
87.sp
88If the smbpasswd file is in the 'old' format (pre-Samba 2.0 format) there is no space in the user's password entry to write this information and the command will FAIL. See
89\fBsmbpasswd\fR(5)
90for details on the 'old' and new password file formats.
91.sp
92This option is only available when running smbpasswd as root.
93.RE
94.PP
95-e
96.RS 3n
97This option specifies that the username following should be
98\fBenabled\fR
99in the local smbpasswd file, if the account was previously disabled. If the account was not disabled this option has no effect. Once the account is enabled then the user will be able to authenticate via SMB once again.
100.sp
101If the smbpasswd file is in the 'old' format, then
102smbpasswd
103will FAIL to enable the account. See
104\fBsmbpasswd\fR(5)
105for details on the 'old' and new password file formats.
106.sp
107This option is only available when running smbpasswd as root.
108.RE
109.PP
110-D debuglevel
111.RS 3n
112\fIdebuglevel\fR
113is an integer from 0 to 10. The default value if this parameter is not specified is zero.
114.sp
115The higher this value, the more detail will be logged to the log files about the activities of smbpasswd. At level 0, only critical errors and serious warnings will be logged.
116.sp
117Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.
118.RE
119.PP
120-n
121.RS 3n
122This option specifies that the username following should have their password set to null (i.e. a blank password) in the local smbpasswd file. This is done by writing the string "NO PASSWORD" as the first part of the first password stored in the smbpasswd file.
123.sp
124Note that to allow users to logon to a Samba server once the password has been set to "NO PASSWORD" in the smbpasswd file the administrator must set the following parameter in the [global] section of the
125\fIsmb.conf\fR
126file :
127.sp
128null passwords = yes
129.sp
130This option is only available when running smbpasswd as root.
131.RE
132.PP
133-r remote machine name
134.RS 3n
135This option allows a user to specify what machine they wish to change their password on. Without this parameter smbpasswd defaults to the local host. The
136\fIremote machine name\fR
137is the NetBIOS name of the SMB/CIFS server to contact to attempt the password change. This name is resolved into an IP address using the standard name resolution mechanism in all programs of the Samba suite. See the
138\fI-R name resolve order\fR
139parameter for details on changing this resolving mechanism.
140.sp
141The username whose password is changed is that of the current UNIX logged on user. See the
142\fI-U username\fR
143parameter for details on changing the password for a different username.
144.sp
145Note that if changing a Windows NT Domain password the remote machine specified must be the Primary Domain Controller for the domain (Backup Domain Controllers only have a read-only copy of the user account database and will not allow the password change).
146.sp
147\fBNote\fR
148that Windows 95/98 do not have a real password database so it is not possible to change passwords specifying a Win95/98 machine as remote machine target.
149.RE
150.PP
151-R name resolve order
152.RS 3n
153This option allows the user of smbpasswd to determine what name resolution services to use when looking up the NetBIOS name of the host being connected to.
154.sp
155The options are :"lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:
156.RS 3n
157.TP 3n
158\(bu
159\fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the
160\fBlmhosts\fR(5)
161for details) then any name type matches for lookup.
162.TP 3n
163\(bu
164\fBhost\fR: Do a standard host name to IP address resolution, using the system
165\fI/etc/hosts \fR, NIS, or DNS lookups. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the
166\fI/etc/nsswitch.conf\fR
167file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored.
168.TP 3n
169\(bu
170\fBwins\fR: Query a name with the IP address listed in the
171\fIwins server\fR
172parameter. If no WINS server has been specified this method will be ignored.
173.TP 3n
174\(bu
175\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
176\fIinterfaces\fR
177parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet.
178.RE
179.IP "" 3n
180The default order is
181lmhosts, host, wins, bcast
182and without this parameter or any entry in the
183\fBsmb.conf\fR(5)
184file the name resolution methods will be attempted in this order.
185.RE
186.PP
187-m
188.RS 3n
189This option tells smbpasswd that the account being changed is a MACHINE account. Currently this is used when Samba is being used as an NT Primary Domain Controller.
190.sp
191This option is only available when running smbpasswd as root.
192.RE
193.PP
194-U username
195.RS 3n
196This option may only be used in conjunction with the
197\fI-r\fR
198option. When changing a password on a remote machine it allows the user to specify the user name on that machine whose password will be changed. It is present to allow users who have different user names on different systems to change these passwords.
199.RE
200.PP
201-h
202.RS 3n
203This option prints the help string for
204smbpasswd, selecting the correct one for running as root or as an ordinary user.
205.RE
206.PP
207-s
208.RS 3n
209This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from
210\fI/dev/tty\fR
211(like the
212passwd(1)
213program does). This option is to aid people writing scripts to drive smbpasswd
214.RE
215.PP
216-w password
217.RS 3n
218This parameter is only available if Samba has been compiled with LDAP support. The
219\fI-w\fR
220switch is used to specify the password to be used with the
221ldap admin dn. Note that the password is stored in the
222\fIsecrets.tdb\fR
223and is keyed off of the admin's DN. This means that if the value of
224\fIldap admin dn\fR
225ever changes, the password will need to be manually updated as well.
226.RE
227.PP
228-W
229.RS 3n
230NOTE:
231This option is same as "-w" except that the password should be entered using stdin.
232.sp
233This parameter is only available if Samba has been compiled with LDAP support. The
234\fI-W\fR
235switch is used to specify the password to be used with the
236ldap admin dn. Note that the password is stored in the
237\fIsecrets.tdb\fR
238and is keyed off of the admin's DN. This means that if the value of
239\fIldap admin dn\fR
240ever changes, the password will need to be manually updated as well.
241.RE
242.PP
243-i
244.RS 3n
245This option tells smbpasswd that the account being changed is an interdomain trust account. Currently this is used when Samba is being used as an NT Primary Domain Controller. The account contains the info about another trusted domain.
246.sp
247This option is only available when running smbpasswd as root.
248.RE
249.PP
250-L
251.RS 3n
252Run in local mode.
253.RE
254.PP
255username
256.RS 3n
257This specifies the username for all of the
258\fBroot only\fR
259options to operate on. Only root can specify this parameter as only root has the permission needed to modify attributes directly in the local smbpasswd file.
260.RE
261.SH "NOTES"
262.PP
263Since
264smbpasswd
265works in client-server mode communicating with a local smbd for a non-root user then the smbd daemon must be running for this to work. A common problem is to add a restriction to the hosts that may access the
266smbd
267running on the local machine by specifying either
268\fIallow hosts\fR
269or
270\fIdeny hosts\fR
271entry in the
272\fBsmb.conf\fR(5)
273file and neglecting to allow "localhost" access to the smbd.
274.PP
275In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords.
276.SH "VERSION"
277.PP
278This man page is correct for version 3.0 of the Samba suite.
279.SH "SEE ALSO"
280.PP
281\fBsmbpasswd\fR(5),
282\fBSamba\fR(7).
283.SH "AUTHOR"
284.PP
285The 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.
286.PP
287The 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
288ftp://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.
289
Note: See TracBrowser for help on using the repository browser.