source: branches/samba-3.5.x/docs/manpages/smbpasswd.8

Last change on this file was 773, checked in by Herwig Bauernfeind, 12 years ago

Samba Server 3.5: Update branch to 3.5.20

File size: 13.2 KB
Line 
1'\" t
2.\" Title: smbpasswd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 12/14/2012
6.\" Manual: System Administration tools
7.\" Source: Samba 3.5
8.\" Language: English
9.\"
10.TH "SMBPASSWD" "8" "12/14/2012" "Samba 3\&.5" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22smbpasswd \- change a user\'s SMB password
23.SH "SYNOPSIS"
24.HP \w'\ 'u
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\fIroot\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\fIsetuid 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 4
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/etc/passwd), 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 4
68This option can be used to specify the path and file name of the
69smb\&.conf
70configuration file when it is important to use other than the default file and / or location\&.
71.RE
72.PP
73\-x
74.RS 4
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 4
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 4
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 4
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 4
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
125smb\&.conf
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 4
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\fINote\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 4
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.sp
157.RS 4
158.ie n \{\
159\h'-04'\(bu\h'+03'\c
160.\}
161.el \{\
162.sp -1
163.IP \(bu 2.3
164.\}
165\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
166\fBlmhosts\fR(5)
167for details) then any name type matches for lookup\&.
168.RE
169.sp
170.RS 4
171.ie n \{\
172\h'-04'\(bu\h'+03'\c
173.\}
174.el \{\
175.sp -1
176.IP \(bu 2.3
177.\}
178\fBhost\fR: Do a standard host name to IP address resolution, using the system
179/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
180/etc/nsswitch\&.conf
181file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
182.RE
183.sp
184.RS 4
185.ie n \{\
186\h'-04'\(bu\h'+03'\c
187.\}
188.el \{\
189.sp -1
190.IP \(bu 2.3
191.\}
192\fBwins\fR: Query a name with the IP address listed in the
193\fIwins server\fR
194parameter\&. If no WINS server has been specified this method will be ignored\&.
195.RE
196.sp
197.RS 4
198.ie n \{\
199\h'-04'\(bu\h'+03'\c
200.\}
201.el \{\
202.sp -1
203.IP \(bu 2.3
204.\}
205\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
206\fIinterfaces\fR
207parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
208.sp
209.RE
210The default order is
211lmhosts, host, wins, bcast
212and without this parameter or any entry in the
213\fBsmb.conf\fR(5)
214file the name resolution methods will be attempted in this order\&.
215.RE
216.PP
217\-m
218.RS 4
219This 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\&.
220.sp
221This option is only available when running smbpasswd as root\&.
222.RE
223.PP
224\-U username
225.RS 4
226This option may only be used in conjunction with the
227\fI\-r\fR
228option\&. 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\&.
229.RE
230.PP
231\-h
232.RS 4
233This option prints the help string for
234smbpasswd, selecting the correct one for running as root or as an ordinary user\&.
235.RE
236.PP
237\-s
238.RS 4
239This 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
240/dev/tty
241(like the
242passwd(1)
243program does)\&. This option is to aid people writing scripts to drive smbpasswd
244.RE
245.PP
246\-w password
247.RS 4
248This parameter is only available if Samba has been compiled with LDAP support\&. The
249\fI\-w\fR
250switch is used to specify the password to be used with the
251\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
252secrets\&.tdb
253and is keyed off of the admin\'s DN\&. This means that if the value of
254\fIldap admin dn\fR
255ever changes, the password will need to be manually updated as well\&.
256.RE
257.PP
258\-W
259.RS 4
260NOTE:
261This option is same as "\-w" except that the password should be entered using stdin\&.
262.sp
263This parameter is only available if Samba has been compiled with LDAP support\&. The
264\fI\-W\fR
265switch is used to specify the password to be used with the
266\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
267secrets\&.tdb
268and is keyed off of the admin\'s DN\&. This means that if the value of
269\fIldap admin dn\fR
270ever changes, the password will need to be manually updated as well\&.
271.RE
272.PP
273\-i
274.RS 4
275This 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\&.
276.sp
277This option is only available when running smbpasswd as root\&.
278.RE
279.PP
280\-L
281.RS 4
282Run in local mode\&.
283.RE
284.PP
285username
286.RS 4
287This specifies the username for all of the
288\fIroot only\fR
289options 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\&.
290.RE
291.SH "NOTES"
292.PP
293Since
294smbpasswd
295works 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
296smbd
297running on the local machine by specifying either
298\fIallow hosts\fR
299or
300\fIdeny hosts\fR
301entry in the
302\fBsmb.conf\fR(5)
303file and neglecting to allow "localhost" access to the smbd\&.
304.PP
305In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords\&.
306.SH "VERSION"
307.PP
308This man page is correct for version 3 of the Samba suite\&.
309.SH "SEE ALSO"
310.PP
311\fBsmbpasswd\fR(5),
312\fBSamba\fR(7)\&.
313.SH "AUTHOR"
314.PP
315The 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\&.
316.PP
317The 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
318ftp://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.