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