Fixed up cross references into smb.conf.5 man page. Still working
[kai/samba.git] / docs / yodldocs / smbpasswd.8.yo
1 mailto(samba-bugs@samba.anu.edu.au) 
2
3 manpage(smbpasswd)(8)(23 Oct 1998)(Samba)(SAMBA)
4
5 label(NAME)
6 manpagename(smbpasswd)(change a users SMB password)
7
8 label(SYNOPSIS)
9 manpagesynopsis() 
10
11 bf(smbpasswd) [-a] [-d] [-e] [-D debug level] [-n] [-r remote_machine] [-R name resolve order] [-m] [-j DOMAIN] [-U username] [-h] [-s] username
12
13 label(DESCRIPTION)
14 manpagedescription()
15
16 This program is part of the bf(Samba) suite.
17
18 The bf(smbpasswd) program has several different functions, depending
19 on whether it is run by the em(root) user or not. When run as a normal
20 user it allows the user to change the password used for their SMB
21 sessions on any machines that store SMB passwords.
22
23 By default (when run with no arguments) it will attempt to change the
24 current users SMB password on the local machine. This is similar to
25 the way the bf(passwd (1)) program works. Note that in order for this
26 to succeed the url(bf(smbd))(smbd.8.html) daemon must be running on
27 the local machine. On a UNIX machine the encrypted SMB passwords are
28 usually stored in the url(bf(smbpasswd (5)))(smbpasswd.5.html) file.
29
30 When run by an ordinary user with no options. bf(smbpasswd) will
31 prompt them for their old smb password and then ask them for their new
32 password twice, to ensure that the new password was typed
33 correctly. No passwords will be echoed on the screen whilst being
34 typed. If you have a blank smb password (specified by the string "NO
35 PASSWORD" in the url(bf(smbpasswd))(smbpasswd.5.html) file) then just
36 press the <Enter> key when asked for your old password.
37
38 bf(smbpasswd) also can be used by a normal user to change their SMB
39 password on remote machines, such as Windows NT Primary Domain
40 Controllers. See the link(bf(-r))(minusr) and link(bf(-U))(minusU)
41 options below.
42
43 When run by root, bf(smbpasswd) allows new users to be added and
44 deleted in the url(bf(smbpasswd))(smbpasswd.5.html) file, as well as
45 changes to the attributes of the user in this file to be made. When
46 run by root, bf(smbpasswd) accesses the local
47 url(bf(smbpasswd))(smbpasswd.5.html) file directly, thus enabling
48 changes to be made even if url(bf(smbd))(smbd.8.html) is not running.
49
50 label(OPTIONS)
51 manpageoptions()
52
53 startdit()
54
55 dit(bf(-a)) This option specifies that the username following should
56 be added to the local url(bf(smbpasswd))(smbpasswd.5.html) file, with
57 the new password typed (type <Enter> for the old password). This
58 option is ignored if the username following already exists in the
59 url(bf(smbpasswd))(smbpasswd.5.html) file and it is treated like a
60 regular change password command. Note that the user to be added .B
61 must already exist in the system password file (usually /etc/passwd)
62 else the request to add the user will fail.
63
64 This option is only available when running bf(smbpasswd) as
65 root.
66
67 label(minusd)
68 dit(bf(-d)) This option specifies that the username following should be
69 em(disabled) in the local url(bf(smbpasswd))(smbpasswd.5.html) file.
70 This is done by writing a em('D') flag into the account control space
71 in the url(bf(smbpasswd))(smbpasswd.5.html) file. Once this is done
72 all attempts to authenticate via SMB using this username will fail.
73
74 If the url(bf(smbpasswd))(smbpasswd.5.html) file is in the 'old'
75 format (pre-Samba 2.0 format) there is no space in the users password
76 entry to write this information and so the user is disabled by writing
77 'X' characters into the password space in the
78 url(bf(smbpasswd))(smbpasswd.5.html) file. See url(bf(smbpasswd
79 (5)))(smbpasswd.5.html) for details on the 'old' and new password file
80 formats.
81
82 This option is only available when running bf(smbpasswd) as root.
83
84 dit(bf(-e)) This option specifies that the username following should be
85 em(enabled) in the local url(bf(smbpasswd))(smbpasswd.5.html) file,
86 if the account was previously disabled. If the account was not
87 disabled this option has no effect. Once the account is enabled
88 then the user will be able to authenticate via SMB once again.
89
90 If the smbpasswd file is in the 'old' format then bf(smbpasswd) will
91 prompt for a new password for this user, otherwise the account will be
92 enabled by removing the em('D') flag from account control space in the
93 url(bf(smbpasswd))(smbpasswd.5.html) file. See url(bf(smbpasswd
94 (5)))(smbpasswd.5.html) for details on the 'old' and new password file
95 formats.
96
97 This option is only available when running bf(smbpasswd) as root.
98
99 label(minusD)
100 dit(bf(-D debuglevel)) debuglevel is an integer from 0
101 to 10.  The default value if this parameter is not specified is zero.
102
103 The higher this value, the more detail will be logged to the log files
104 about the activities of smbpasswd. At level 0, only critical errors
105 and serious warnings will be logged.
106
107 Levels above 1 will generate considerable amounts of log data, and
108 should only be used when investigating a problem. Levels above 3 are
109 designed for use only by developers and generate HUGE amounts of log
110 data, most of which is extremely cryptic.
111
112 dit(bf(-n)) This option specifies that the username following should
113 have their password set to null (i.e. a blank password) in the local
114 url(bf(smbpasswd))(smbpasswd.5.html) file. This is done by writing the
115 string "NO PASSWORD" as the first part of the first password stored in
116 the url(bf(smbpasswd))(smbpasswd.5.html) file.
117
118 Note that to allow users to logon to a Samba server once the password
119 has been set to "NO PASSWORD" in the
120 url(bf(smbpasswd))(smbpasswd.5.html) file the administrator must set
121 the following parameter in the [global] section of the
122 url(bf(smb.conf))(smb.conf.5.html) file :
123
124 url(null passwords = true)(smb.conf.5.html#null passwords)
125
126 This option is only available when running bf(smbpasswd) as root.
127
128 dit(bf(-r remote machine name)) This option allows a user to specify
129 what machine they wish to change their password on. Without this
130 parameter bf(smbpasswd) defaults to the local host. The em("remote
131 machine name") is the NetBIOS name of the SMB/CIFS server to contact
132 to attempt the password change. This name is resolved into an IP
133 address using the standard name resolution mechanism in all programs
134 of the url(bf(Samba))(samba.7.html) suite. See the link(bf(-R name
135 resolve order))(nameresolveorder) parameter for details on changing this
136 resolving mechanism.
137
138 The username whose password is changed is that of the current UNIX
139 logged on user. See the link(bf(-U username))(minusU) parameter for
140 details on changing the password for a different username.
141  
142 Note that if changing a Windows NT Domain password the remote machine
143 specified must be the Primary Domain Controller for the domain (Backup
144 Domain Controllers only have a read-only copy of the user account
145 database and will not allow the password change).
146
147 label(nameresolveorder)
148 dit(bf(-R name resolve order)) This option allows the user of
149 smbclient to determine what name resolution services to use when
150 looking up the NetBIOS name of the host being connected to.
151
152 The options are :"lmhosts", "host", "wins" and "bcast". They cause
153 names to be resolved as follows :
154
155 startit()
156
157 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
158
159 it() bf(host) : Do a standard host name to IP address resolution,
160 using the system /etc/hosts, NIS, or DNS lookups. This method of name
161 resolution is operating system depended for instance on IRIX or
162 Solaris this may be controlled by the em(/etc/nsswitch.conf) file).
163
164 it() bf(wins) : Query a name with the IP address listed in the url(bf(wins
165 server))(smb.conf.5.html#wins server) parameter in the smb.conf file. If 
166 no WINS server has been specified this method will be ignored.
167
168 it() bf(bcast) : Do a broadcast on each of the known local interfaces
169 listed in the url(bf(interfaces))(smb.conf.5.html#interfaces) parameter
170 in the smb.conf file. This is the least reliable of the name resolution
171 methods as it depends on the target host being on a locally connected
172 subnet.
173
174 endit()
175
176 If this parameter is not set then the name resolver order defined
177 in the url(bf(smb.conf))(smb.conf.5.html) file parameter 
178 url((bf(name resolve order))(smb.conf.5.html#name resolve order)
179 will be used.
180
181 The default order is lmhosts, host, wins, bcast and without this
182 parameter or any entry in the url(bf(smb.conf))(smb.conf.5.html) 
183 file the name resolution methods will be attempted in this order.
184
185 dit(bf(-m)) This option tells bf(smbpasswd) that the account being
186 changed is a em(MACHINE) account. Currently this is used when Samba is
187 being used as an NT Primary Domain Controller. PDC support is not a
188 supported feature in Samba2.0 but will become supported in a later
189 release. If you wish to know more about using Samba as an NT PDC then
190 please subscribe to the mailing list
191 email(samba-ntdom@samba.anu.edu.au).
192
193 This option is only available when running bf(smbpasswd) as root.
194
195 dit(bf(-j DOMAIN)) This option is used to add a Samba server into a
196 Windows NT Domain, as a Domain member capable of authenticating user
197 accounts to any Domain Controller in the same way as a Windows NT
198 Server. See the url(bf(security=domain))(smb.conf.5.html#security)
199 option in the url(bf(smb.conf (5)))(smb.conf.5.html) man page.
200
201 In order to be used in this way, the Administrator for the Windows
202 NT Domain must have used the program em("Server Manager for Domains")
203 to add the url(primary NetBIOS name)(smb.conf.5.html#netbios name) of 
204 the Samba server as a member of the Domain.
205
206 After this has been done, to join the Domain invoke bf(smbpasswd) with
207 this parameter. bf(smbpasswd) will then look up the Primary Domain
208 Controller for the Domain (found in the
209 url(bf(smb.conf))(smb.conf.5.html) file in the parameter
210 url(bf("password server"))(smb.conf.5.html#password server) and change
211 the machine account password used to create the secure Domain
212 communication.  This password is then stored by bf(smbpasswd) in a
213 file, read only by root, called tt(<Domain>.<Machine>.mac) where
214 tt(<Domain>) is the name of the Domain we are joining and tt<Machine>
215 is the primary NetBIOS name of the machine we are running on.
216
217 Once this operation has been performed the
218 url(bf(smb.conf))(smb.conf.5.html) file may be updated to set the
219 url(bf(security=domain))(smb.conf.5.html#security) option and all
220 future logins to the Samba server will be authenticated to the Windows
221 NT PDC.
222
223 Note that even though the authentication is being done to the PDC all
224 users accessing the Samba server must still have a valid UNIX account
225 on that machine.
226
227 This option is only available when running bf(smbpasswd) as root.
228
229 label(minusU)
230 dit(bf(-U username))
231
232 HERE !!!!
233
234 .RE
235 .I username
236
237 .RS 3
238 You may only specify a username to the smbpasswd command
239 if you are running as root. Only root should have the
240 permission to modify other users smb passwords.
241
242 NOTES
243
244 .B New for 1.9.18p4.
245 smbpasswd will now allow a user to change their password
246 on a Windows NT server. To use this add the 
247 .I \-r
248 .I \<remote_machine\>
249 paramter to the smbpasswd command. The machine name is looked
250 up using the "name resolve order" parameter defined in the
251 smb.conf [global] section. Note that when changing a Windows
252 NT password for a domain user,
253 .I \<remote machine\>
254 must be the name of the Primary domain controller.
255
256 To allow users to change their passwords from "NO PASSWORD" in the
257 smbpasswd file to a valid password the administrator must set the
258 following parameter in the [global] section of the smb.conf :
259
260 null passwords = true
261
262 This is .B NOT recommended as a general policy, it is recommended that
263 new users be assigned a default password instead.
264
265
266 The 
267 .I \-a
268 and 
269 .I username
270 options can only be used by a user running as root.
271
272 .RE
273 .RE
274 .SH INSTALLATION
275
276 The location of the server and its support files is a matter for individual
277 system administrators. The following are thus suggestions only.
278
279 It is recommended that the
280 .B smbpasswd
281 program be installed in the /usr/local/samba/bin directory. This should be
282 a directory readable by all, writeable only by root. The program should be
283 executable by all. The program 
284 .B must not 
285 be setuid root.
286
287 .SH VERSION
288
289 This man page is correct for version 1.9.18p4 of the Samba suite.
290 These notes will necessarily lag behind 
291 development of the software, so it is possible that your version of 
292 the program has extensions or parameter semantics that differ from or are not 
293 covered by this man page. Please notify these to the address below for 
294 rectification.
295 .SH SEE ALSO
296 .BR smbd (8), 
297 .BR smb.conf (5) 
298 .SH
299 .B BUGS
300
301 .RE
302 The
303 .B smbpasswd
304 command is only useful if
305 .I Samba
306 has been set up to use encrypted passwords. See the file
307 .I ENCRYPTION.txt
308 in the docs directory for details on how to do this.
309
310 .SH CREDITS
311 .RE
312 The original Samba software and related utilities were created by 
313 Andrew Tridgell (samba-bugs@samba.anu.edu.au). Andrew is also the Keeper
314 of the Source for this project. smbpasswd and the encrypted password
315 file code was written by Jeremy Allison (samba-bugs@samba.anu.edu.au).
316
317 This man page was written by Jeremy Allison. Bug reports to samba-bugs@samba.anu.edu.au.
318
319 See
320 .BR smb.conf (5)
321 for a full list of contributors and details of how to 
322 submit bug reports, comments etc.