source: vendor/3.6.23/docs/manpages/smbpasswd.8

Last change on this file was 860, checked in by Silvan Scherrer, 11 years ago

Samba 3.6: updated vendor to latest version

File size: 13.4 KB
Line 
1'\" t
2.\" Title: smbpasswd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5.\" Date: 09/18/2013
6.\" Manual: System Administration tools
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "SMBPASSWD" "8" "09/18/2013" "Samba 3\&.6" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31smbpasswd \- change a user\*(Aqs SMB password
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34smbpasswd [\-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]
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41The smbpasswd program has several different functions, depending on whether it is run by the
42\fIroot\fR
43user 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\&.
44.PP
45By default (when run with no arguments) it will attempt to change the current user\*(Aqs SMB password on the local machine\&. This is similar to the way the
46passwd(1)
47program works\&.
48smbpasswd
49differs from how the passwd program works however in that it is not
50\fIsetuid root\fR
51but works in a client\-server mode and communicates with a locally running
52\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
53\fBsmbpasswd\fR(5)
54file\&.
55.PP
56When 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\&.
57.PP
58smbpasswd 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
59\fI\-U\fR
60options below\&.
61.PP
62When 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,
63smbpasswd
64accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running\&.
65.SH "OPTIONS"
66.PP
67\-a
68.RS 4
69This 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
70/etc/passwd), else the request to add the user will fail\&.
71.sp
72This option is only available when running smbpasswd as root\&.
73.RE
74.PP
75\-c
76.RS 4
77This option can be used to specify the path and file name of the
78smb\&.conf
79configuration file when it is important to use other than the default file and / or location\&.
80.RE
81.PP
82\-x
83.RS 4
84This option specifies that the username following should be deleted from the local smbpasswd file\&.
85.sp
86This option is only available when running smbpasswd as root\&.
87.RE
88.PP
89\-d
90.RS 4
91This option specifies that the username following should be
92\fBdisabled\fR
93in the local smbpasswd file\&. This is done by writing a
94\fB\*(AqD\*(Aq\fR
95flag into the account control space in the smbpasswd file\&. Once this is done all attempts to authenticate via SMB using this username will fail\&.
96.sp
97If the smbpasswd file is in the \*(Aqold\*(Aq format (pre\-Samba 2\&.0 format) there is no space in the user\*(Aqs password entry to write this information and the command will FAIL\&. See
98\fBsmbpasswd\fR(5)
99for details on the \*(Aqold\*(Aq and new password file formats\&.
100.sp
101This option is only available when running smbpasswd as root\&.
102.RE
103.PP
104\-e
105.RS 4
106This option specifies that the username following should be
107\fBenabled\fR
108in 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\&.
109.sp
110If the smbpasswd file is in the \*(Aqold\*(Aq format, then
111smbpasswd
112will FAIL to enable the account\&. See
113\fBsmbpasswd\fR(5)
114for details on the \*(Aqold\*(Aq and new password file formats\&.
115.sp
116This option is only available when running smbpasswd as root\&.
117.RE
118.PP
119\-D debuglevel
120.RS 4
121\fIdebuglevel\fR
122is an integer from 0 to 10\&. The default value if this parameter is not specified is zero\&.
123.sp
124The 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\&.
125.sp
126Levels 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\&.
127.RE
128.PP
129\-n
130.RS 4
131This 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\&.
132.sp
133Note 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
134smb\&.conf
135file :
136.sp
137null passwords = yes
138.sp
139This option is only available when running smbpasswd as root\&.
140.RE
141.PP
142\-r remote machine name
143.RS 4
144This 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
145\fIremote machine name\fR
146is 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
147\fI\-R name resolve order\fR
148parameter for details on changing this resolving mechanism\&.
149.sp
150The username whose password is changed is that of the current UNIX logged on user\&. See the
151\fI\-U username\fR
152parameter for details on changing the password for a different username\&.
153.sp
154Note 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)\&.
155.sp
156\fINote\fR
157that 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\&.
158.RE
159.PP
160\-R name resolve order
161.RS 4
162This 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\&.
163.sp
164The options are :"lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
165.sp
166.RS 4
167.ie n \{\
168\h'-04'\(bu\h'+03'\c
169.\}
170.el \{\
171.sp -1
172.IP \(bu 2.3
173.\}
174\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
175\fBlmhosts\fR(5)
176for details) then any name type matches for lookup\&.
177.RE
178.sp
179.RS 4
180.ie n \{\
181\h'-04'\(bu\h'+03'\c
182.\}
183.el \{\
184.sp -1
185.IP \(bu 2.3
186.\}
187\fBhost\fR: Do a standard host name to IP address resolution, using the system
188/etc/hosts, 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
189/etc/nsswitch\&.conf
190file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
191.RE
192.sp
193.RS 4
194.ie n \{\
195\h'-04'\(bu\h'+03'\c
196.\}
197.el \{\
198.sp -1
199.IP \(bu 2.3
200.\}
201\fBwins\fR: Query a name with the IP address listed in the
202\fIwins server\fR
203parameter\&. If no WINS server has been specified this method will be ignored\&.
204.RE
205.sp
206.RS 4
207.ie n \{\
208\h'-04'\(bu\h'+03'\c
209.\}
210.el \{\
211.sp -1
212.IP \(bu 2.3
213.\}
214\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
215\fIinterfaces\fR
216parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
217.RE
218.sp
219.RE
220The default order is
221lmhosts, host, wins, bcast
222and without this parameter or any entry in the
223\fBsmb.conf\fR(5)
224file the name resolution methods will be attempted in this order\&.
225.RE
226.PP
227\-m
228.RS 4
229This 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\&.
230.sp
231This option is only available when running smbpasswd as root\&.
232.RE
233.PP
234\-U username
235.RS 4
236This option may only be used in conjunction with the
237\fI\-r\fR
238option\&. 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\&.
239.RE
240.PP
241\-h
242.RS 4
243This option prints the help string for
244smbpasswd, selecting the correct one for running as root or as an ordinary user\&.
245.RE
246.PP
247\-s
248.RS 4
249This 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
250/dev/tty
251(like the
252passwd(1)
253program does)\&. This option is to aid people writing scripts to drive smbpasswd
254.RE
255.PP
256\-w password
257.RS 4
258This parameter is only available if Samba has been compiled with LDAP support\&. The
259\fI\-w\fR
260switch is used to specify the password to be used with the
261\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
262secrets\&.tdb
263and is keyed off of the admin\*(Aqs DN\&. This means that if the value of
264\fIldap admin dn\fR
265ever changes, the password will need to be manually updated as well\&.
266.RE
267.PP
268\-W
269.RS 4
270NOTE:
271This option is same as "\-w" except that the password should be entered using stdin\&.
272.sp
273This parameter is only available if Samba has been compiled with LDAP support\&. The
274\fI\-W\fR
275switch is used to specify the password to be used with the
276\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
277secrets\&.tdb
278and is keyed off of the admin\*(Aqs DN\&. This means that if the value of
279\fIldap admin dn\fR
280ever changes, the password will need to be manually updated as well\&.
281.RE
282.PP
283\-i
284.RS 4
285This 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\&.
286.sp
287This option is only available when running smbpasswd as root\&.
288.RE
289.PP
290\-L
291.RS 4
292Run in local mode\&.
293.RE
294.PP
295username
296.RS 4
297This specifies the username for all of the
298\fIroot only\fR
299options 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\&.
300.RE
301.SH "NOTES"
302.PP
303Since
304smbpasswd
305works 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
306smbd
307running on the local machine by specifying either
308\fIallow hosts\fR
309or
310\fIdeny hosts\fR
311entry in the
312\fBsmb.conf\fR(5)
313file and neglecting to allow "localhost" access to the smbd\&.
314.PP
315In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords\&.
316.SH "VERSION"
317.PP
318This man page is correct for version 3 of the Samba suite\&.
319.SH "SEE ALSO"
320.PP
321\fBsmbpasswd\fR(5),
322\fBSamba\fR(7)\&.
323.SH "AUTHOR"
324.PP
325The 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\&.
326.PP
327The 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
328ftp://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\&.
Note: See TracBrowser for help on using the repository browser.