global change from samba.anu.edu.au to samba.org
[ira/wip.git] / docs / yodldocs / smbpasswd.8.yo
1 mailto(samba-bugs@samba.org) 
2
3 manpage(smbpasswd htmlcommand((8)))(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) [link(-a)(minusa)] [link(-d)(minusd)] [link(-e)(minuse)] [link(-D debug level)(minusD)] [link(-n)(minusn)] [link(-r remote_machine)(minusr)] [link(-R name resolve order)(minusR)] [link(-m)(minusm)] [link(-j DOMAIN)(minusj)] [link(-U username)(minusU)] [link(-h)(minush)] [link(-s)(minuss)] link(username)(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. bf(smbpasswd) differs from how
26 the bf(passwd) program works however in that it is not em(setuid root)
27 but works in a client-server mode and communicates with a locally
28 running url(bf(smbd))(smbd.8.html). As a consequence in order for this
29 to succeed the url(bf(smbd))(smbd.8.html) daemon must be running on
30 the local machine. On a UNIX machine the encrypted SMB passwords are
31 usually stored in the url(bf(smbpasswd (5)))(smbpasswd.5.html) file.
32
33 When run by an ordinary user with no options. bf(smbpasswd) will
34 prompt them for their old smb password and then ask them for their new
35 password twice, to ensure that the new password was typed
36 correctly. No passwords will be echoed on the screen whilst being
37 typed. If you have a blank smb password (specified by the string "NO
38 PASSWORD" in the url(bf(smbpasswd))(smbpasswd.5.html) file) then just
39 press the <Enter> key when asked for your old password.
40
41 bf(smbpasswd) can also be used by a normal user to change their SMB
42 password on remote machines, such as Windows NT Primary Domain
43 Controllers. See the link((bf(-r)))(minusr) and
44 link(bf(-U))(minusU) options below.
45
46 When run by root, bf(smbpasswd) allows new users to be added and
47 deleted in the url(bf(smbpasswd))(smbpasswd.5.html) file, as well as
48 allows changes to the attributes of the user in this file to be made. When
49 run by root, bf(smbpasswd) accesses the local
50 url(bf(smbpasswd))(smbpasswd.5.html) file directly, thus enabling
51 changes to be made even if url(bf(smbd))(smbd.8.html) is not running.
52
53 label(OPTIONS)
54 manpageoptions()
55
56 startdit()
57
58 label(minusa)
59 dit(bf(-a)) This option specifies that the username following should
60 be added to the local url(bf(smbpasswd))(smbpasswd.5.html) file, with
61 the new password typed (type <Enter> for the old password). This
62 option is ignored if the username following already exists in the
63 url(bf(smbpasswd))(smbpasswd.5.html) file and it is treated like a
64 regular change password command. Note that the user to be added
65 bf(must) already exist in the system password file (usually /etc/passwd)
66 else the request to add the user will fail.
67
68 This option is only available when running bf(smbpasswd) as
69 root.
70
71 label(minusd)
72 dit(bf(-d)) This option specifies that the username following should be
73 em(disabled) in the local url(bf(smbpasswd))(smbpasswd.5.html) file.
74 This is done by writing a em('D') flag into the account control space
75 in the url(bf(smbpasswd))(smbpasswd.5.html) file. Once this is done
76 all attempts to authenticate via SMB using this username will fail.
77
78 If the url(bf(smbpasswd))(smbpasswd.5.html) file is in the 'old'
79 format (pre-Samba 2.0 format) there is no space in the users password
80 entry to write this information and so the user is disabled by writing
81 'X' characters into the password space in the
82 url(bf(smbpasswd))(smbpasswd.5.html) file. See url(bf(smbpasswd
83 (5)))(smbpasswd.5.html) for details on the 'old' and new password file
84 formats.
85
86 This option is only available when running bf(smbpasswd) as root.
87
88 label(minuse)
89 dit(bf(-e)) This option specifies that the username following should be
90 em(enabled) in the local url(bf(smbpasswd))(smbpasswd.5.html) file,
91 if the account was previously disabled. If the account was not
92 disabled this option has no effect. Once the account is enabled
93 then the user will be able to authenticate via SMB once again.
94
95 If the smbpasswd file is in the 'old' format then bf(smbpasswd) will
96 prompt for a new password for this user, otherwise the account will be
97 enabled by removing the em('D') flag from account control space in the
98 url(bf(smbpasswd))(smbpasswd.5.html) file. See url(bf(smbpasswd
99 (5)))(smbpasswd.5.html) for details on the 'old' and new password file
100 formats.
101
102 This option is only available when running bf(smbpasswd) as root.
103
104 label(minusD)
105 dit(bf(-D debuglevel)) debuglevel is an integer from 0
106 to 10.  The default value if this parameter is not specified is zero.
107
108 The higher this value, the more detail will be logged to the log files
109 about the activities of smbpasswd. At level 0, only critical errors
110 and serious warnings will be logged.
111
112 Levels above 1 will generate considerable amounts of log data, and
113 should only be used when investigating a problem. Levels above 3 are
114 designed for use only by developers and generate HUGE amounts of log
115 data, most of which is extremely cryptic.
116
117 label(minusn)
118 dit(bf(-n)) This option specifies that the username following should
119 have their password set to null (i.e. a blank password) in the local
120 url(bf(smbpasswd))(smbpasswd.5.html) file. This is done by writing the
121 string "NO PASSWORD" as the first part of the first password stored in
122 the url(bf(smbpasswd))(smbpasswd.5.html) file.
123
124 Note that to allow users to logon to a Samba server once the password
125 has been set to "NO PASSWORD" in the
126 url(bf(smbpasswd))(smbpasswd.5.html) file the administrator must set
127 the following parameter in the [global] section of the
128 url(bf(smb.conf))(smb.conf.5.html) file :
129
130 url(null passwords = true)(smb.conf.5.html#nullpasswords)
131
132 This option is only available when running bf(smbpasswd) as root.
133
134 label(minusr) 
135 dit(bf(-r remote machine name)) This option allows a
136 user to specify what machine they wish to change their password
137 on. Without this parameter bf(smbpasswd) defaults to the local
138 host. The em("remote machine name") is the NetBIOS name of the
139 SMB/CIFS server to contact to attempt the password change. This name
140 is resolved into an IP address using the standard name resolution
141 mechanism in all programs of the url(bf(Samba))(samba.7.html)
142 suite. See the link(bf(-R name resolve order))(minusR) parameter for details on changing this resolving
143 mechanism.
144
145 The username whose password is changed is that of the current UNIX
146 logged on user. See the link(bf(-U username))(minusU)
147 parameter for details on changing the password for a different
148 username.
149  
150 Note that if changing a Windows NT Domain password the remote machine
151 specified must be the Primary Domain Controller for the domain (Backup
152 Domain Controllers only have a read-only copy of the user account
153 database and will not allow the password change).
154
155 em(Note) that Windows 95/98 do not have a real password database
156 so it is not possible to change passwords specifying a Win95/98 
157 machine as remote machine target.
158
159 label(minusR)
160 dit(bf(-R name resolve order)) This option allows the user of
161 smbclient to determine what name resolution services to use when
162 looking up the NetBIOS name of the host being connected to.
163
164 The options are :link("lmhosts")(lmhosts), link("host")(host),
165 link("wins")(wins) and link("bcast")(bcast). They cause names to be
166 resolved as follows :
167
168 startit()
169
170 label(lmhosts)
171 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
172
173 label(host)
174 it() bf(host) : Do a standard host name to IP address resolution,
175 using the system /etc/hosts, NIS, or DNS lookups. This method of name
176 resolution is operating system dependent. For instance on IRIX or
177 Solaris, this may be controlled by the em(/etc/nsswitch.conf) file).
178
179 label(wins)
180 it() bf(wins) : Query a name with the IP address listed in the 
181 url(bf(wins server))(smb.conf.5.html#winsserver) parameter in the 
182 url(bf(smb.conf file))(smb.conf.5.html). If 
183 no WINS server has been specified this method will be ignored.
184
185 label(bcast)
186 it() bf(bcast) : Do a broadcast on each of the known local interfaces
187 listed in the url(bf(interfaces))(smb.conf.5.html#interfaces) parameter
188 in the smb.conf file. This is the least reliable of the name resolution
189 methods as it depends on the target host being on a locally connected
190 subnet.
191
192 endit()
193
194 If this parameter is not set then the name resolve order defined
195 in the url(bf(smb.conf))(smb.conf.5.html) file parameter 
196 url(bf(name resolve order))(smb.conf.5.html#nameresolveorder)
197 will be used.
198
199 The default order is lmhosts, host, wins, bcast and without this
200 parameter or any entry in the url(bf(smb.conf))(smb.conf.5.html) 
201 file the name resolution methods will be attempted in this order.
202
203 label(minusm)
204 dit(bf(-m)) This option tells bf(smbpasswd) that the account being
205 changed is a em(MACHINE) account. Currently this is used when Samba is
206 being used as an NT Primary Domain Controller. PDC support is not a
207 supported feature in Samba2.0 but will become supported in a later
208 release. If you wish to know more about using Samba as an NT PDC then
209 please subscribe to the mailing list
210 email(samba-ntdom@samba.org).
211
212 This option is only available when running bf(smbpasswd) as root.
213
214 label(minusj)
215 dit(bf(-j DOMAIN)) This option is used to add a Samba server into a
216 Windows NT Domain, as a Domain member capable of authenticating user
217 accounts to any Domain Controller in the same way as a Windows NT
218 Server. See the url(bf(security=domain))(smb.conf.5.html#security)
219 option in the url(bf(smb.conf (5)))(smb.conf.5.html) man page.
220
221 In order to be used in this way, the Administrator for the Windows
222 NT Domain must have used the program em("Server Manager for Domains")
223 to add the url(primary NetBIOS name)(smb.conf.5.html#netbiosname) of 
224 the Samba server as a member of the Domain.
225
226 After this has been done, to join the Domain invoke bf(smbpasswd) with
227 this parameter. bf(smbpasswd) will then look up the Primary Domain
228 Controller for the Domain (found in the
229 url(bf(smb.conf))(smb.conf.5.html) file in the parameter
230 url(bf(password server))(smb.conf.5.html#passwordserver) and change
231 the machine account password used to create the secure Domain
232 communication.  This password is then stored by bf(smbpasswd) in a
233 file, read only by root, called tt(<Domain>.<Machine>.mac) where
234 tt(<Domain>) is the name of the Domain we are joining and tt(<Machine>)
235 is the primary NetBIOS name of the machine we are running on.
236
237 Once this operation has been performed the
238 url(bf(smb.conf))(smb.conf.5.html) file may be updated to set the
239 url(bf(security=domain))(smb.conf.5.html#security) option and all
240 future logins to the Samba server will be authenticated to the Windows
241 NT PDC.
242
243 Note that even though the authentication is being done to the PDC all
244 users accessing the Samba server must still have a valid UNIX account
245 on that machine.
246
247 This option is only available when running bf(smbpasswd) as root.
248
249 label(minusU)
250 dit(bf(-U username)) This option may only be used in
251 conjunction with the link(bf(-r))(minusr)
252 option. When changing a password on a remote machine it allows the
253 user to specify the user name on that machine whose password will be
254 changed. It is present to allow users who have different user names on
255 different systems to change these passwords.
256
257 label(minush)
258 dit(bf(-h)) This option prints the help string for bf(smbpasswd), 
259 selecting the correct one for running as root or as an ordinary user.
260
261 label(minuss)
262 dit(bf(-s)) This option causes bf(smbpasswd) to be silent (i.e. not
263 issue prompts) and to read it's old and new passwords from standard 
264 input, rather than from tt(/dev/tty) (like the bf(passwd (1)) program
265 does). This option is to aid people writing scripts to drive bf(smbpasswd)
266
267 label(username)
268 dit(bf(username)) This specifies the username for all of the em(root
269 only) options to operate on. Only root can specify this parameter as
270 only root has the permission needed to modify attributes directly
271 in the local url(bf(smbpasswd))(smbpasswd.5.html) file.
272
273 label(NOTES)
274 manpagesection(NOTES)
275
276 Since bf(smbpasswd) works in client-server mode communicating with a
277 local url(bf(smbd))(smbd.8.html) for a non-root user then the bf(smbd)
278 daemon must be running for this to work. A common problem is to add a
279 restriction to the hosts that may access the bf(smbd) running on the
280 local machine by specifying a url(bf("allow
281 hosts"))(smb.conf.5.html#allowhosts) or url(bf("deny
282 hosts"))(smb.conf.5.html#denyhosts) entry in the
283 url(bf(smb.conf))(smb.conf.5.html) file and neglecting to allow
284 em("localhost") access to the bf(smbd).
285
286 In addition, the bf(smbpasswd) command is only useful if bf(Samba) has
287 been set up to use encrypted passwords. See the file bf(ENCRYPTION.txt)
288 in the docs directory for details on how to do this.
289
290 label(VERSION)
291 manpagesection(VERSION)
292
293 This man page is correct for version 2.0 of the Samba suite.
294
295 label(AUTHOR)
296 manpageauthor()
297
298 The original Samba software and related utilities were created by
299 Andrew Tridgell email(samba-bugs@samba.org). Samba is now developed
300 by the Samba Team as an Open Source project similar to the way the
301 Linux kernel is developed.
302
303 The original Samba man pages were written by Karl Auer. The man page
304 sources were converted to YODL format (another excellent piece of Open
305 Source software, available at
306 url(bf(ftp://ftp.icce.rug.nl/pub/unix/))(ftp://ftp.icce.rug.nl/pub/unix/))
307 and updated for the Samba2.0 release by Jeremy Allison.
308 email(samba-bugs@samba.org).
309
310 See url(bf(samba (7)))(samba.7.html) to find out how to get a full
311 list of contributors and details on how to submit bug reports,
312 comments etc.