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

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 13.4 KB
Line 
1'\" t
2.\" Title: smbpasswd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 10/25/2016
6.\" Manual: System Administration tools
7.\" Source: Samba 4.4
8.\" Language: English
9.\"
10.TH "SMBPASSWD" "8" "10/25/2016" "Samba 4\&.4" "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 configuration file when it is important to use other than the default file and / or location\&.
78.RE
79.PP
80\-x
81.RS 4
82This option specifies that the username following should be deleted from the local smbpasswd file\&.
83.sp
84This option is only available when running smbpasswd as root\&.
85.RE
86.PP
87\-d
88.RS 4
89This option specifies that the username following should be
90\fBdisabled\fR
91in the local smbpasswd file\&. This is done by writing a
92\fB\*(AqD\*(Aq\fR
93flag into the account control space in the smbpasswd file\&. Once this is done all attempts to authenticate via SMB using this username will fail\&.
94.sp
95If 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
96\fBsmbpasswd\fR(5)
97for details on the \*(Aqold\*(Aq and new password file formats\&.
98.sp
99This option is only available when running smbpasswd as root\&.
100.RE
101.PP
102\-e
103.RS 4
104This option specifies that the username following should be
105\fBenabled\fR
106in 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\&.
107.sp
108If the smbpasswd file is in the \*(Aqold\*(Aq format, then
109smbpasswd
110will FAIL to enable the account\&. See
111\fBsmbpasswd\fR(5)
112for details on the \*(Aqold\*(Aq and new password file formats\&.
113.sp
114This option is only available when running smbpasswd as root\&.
115.RE
116.PP
117\-D debuglevel
118.RS 4
119\fIdebuglevel\fR
120is an integer from 0 to 10\&. The default value if this parameter is not specified is zero\&.
121.sp
122The 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\&.
123.sp
124Levels 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\&.
125.RE
126.PP
127\-n
128.RS 4
129This 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\&.
130.sp
131Note 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
132smb\&.conf
133file :
134.sp
135null passwords = yes
136.sp
137This option is only available when running smbpasswd as root\&.
138.RE
139.PP
140\-r remote machine name
141.RS 4
142This 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
143\fIremote machine name\fR
144is 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
145\fI\-R name resolve order\fR
146parameter for details on changing this resolving mechanism\&.
147.sp
148The username whose password is changed is that of the current UNIX logged on user\&. See the
149\fI\-U username\fR
150parameter for details on changing the password for a different username\&.
151.sp
152Note 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)\&.
153.sp
154\fINote\fR
155that 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\&.
156.RE
157.PP
158\-R name resolve order
159.RS 4
160This 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\&.
161.sp
162The options are :"lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
163.sp
164.RS 4
165.ie n \{\
166\h'-04'\(bu\h'+03'\c
167.\}
168.el \{\
169.sp -1
170.IP \(bu 2.3
171.\}
172\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
173\fBlmhosts\fR(5)
174for details) then any name type matches for lookup\&.
175.RE
176.sp
177.RS 4
178.ie n \{\
179\h'-04'\(bu\h'+03'\c
180.\}
181.el \{\
182.sp -1
183.IP \(bu 2.3
184.\}
185\fBhost\fR: Do a standard host name to IP address resolution, using the system
186/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
187/etc/nsswitch\&.conf
188file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
189.RE
190.sp
191.RS 4
192.ie n \{\
193\h'-04'\(bu\h'+03'\c
194.\}
195.el \{\
196.sp -1
197.IP \(bu 2.3
198.\}
199\fBwins\fR: Query a name with the IP address listed in the
200\fIwins server\fR
201parameter\&. If no WINS server has been specified this method will be ignored\&.
202.RE
203.sp
204.RS 4
205.ie n \{\
206\h'-04'\(bu\h'+03'\c
207.\}
208.el \{\
209.sp -1
210.IP \(bu 2.3
211.\}
212\fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
213\fIinterfaces\fR
214parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
215.RE
216.sp
217.RE
218The default order is
219lmhosts, host, wins, bcast
220and without this parameter or any entry in the
221\fBsmb.conf\fR(5)
222file the name resolution methods will be attempted in this order\&.
223.RE
224.PP
225\-m
226.RS 4
227This 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\&.
228.sp
229This option is only available when running smbpasswd as root\&.
230.RE
231.PP
232\-U username
233.RS 4
234This option may only be used in conjunction with the
235\fI\-r\fR
236option\&. 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\&.
237.RE
238.PP
239\-h
240.RS 4
241This option prints the help string for
242smbpasswd, selecting the correct one for running as root or as an ordinary user\&.
243.RE
244.PP
245\-s
246.RS 4
247This 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
248/dev/tty
249(like the
250passwd(1)
251program does)\&. This option is to aid people writing scripts to drive smbpasswd
252.RE
253.PP
254\-w password
255.RS 4
256This parameter is only available if Samba has been compiled with LDAP support\&. The
257\fI\-w\fR
258switch is used to specify the password to be used with the
259\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
260secrets\&.tdb
261and is keyed off of the admin\*(Aqs DN\&. This means that if the value of
262\fIldap admin dn\fR
263ever changes, the password will need to be manually updated as well\&.
264.RE
265.PP
266\-W
267.RS 4
268NOTE:
269This option is same as "\-w" except that the password should be entered using stdin\&.
270.sp
271This parameter is only available if Samba has been compiled with LDAP support\&. The
272\fI\-W\fR
273switch is used to specify the password to be used with the
274\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
275secrets\&.tdb
276and is keyed off of the admin\*(Aqs DN\&. This means that if the value of
277\fIldap admin dn\fR
278ever changes, the password will need to be manually updated as well\&.
279.RE
280.PP
281\-i
282.RS 4
283This 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\&.
284.sp
285This option is only available when running smbpasswd as root\&.
286.RE
287.PP
288\-L
289.RS 4
290Run in local mode\&.
291.RE
292.PP
293username
294.RS 4
295This specifies the username for all of the
296\fIroot only\fR
297options 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\&.
298.RE
299.SH "NOTES"
300.PP
301Since
302smbpasswd
303works 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
304smbd
305running on the local machine by specifying either
306\fIallow hosts\fR
307or
308\fIdeny hosts\fR
309entry in the
310\fBsmb.conf\fR(5)
311file and neglecting to allow "localhost" access to the smbd\&.
312.PP
313In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords\&.
314.SH "VERSION"
315.PP
316This man page is correct for version 3 of the Samba suite\&.
317.SH "SEE ALSO"
318.PP
319\fBsmbpasswd\fR(5),
320\fBSamba\fR(7)\&.
321.SH "AUTHOR"
322.PP
323The 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\&.
324.PP
325The 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
326ftp://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.