~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to docs/manpages/smbpasswd.8

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-29 06:16:15 UTC
  • mfrom: (0.27.9 upstream) (0.34.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100129061615-37hs6xqpsdhjq3ld
Tags: 2:3.4.5~dfsg-1ubuntu1
* Merge from debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - Add "(Samba, Ubuntu)" to server string.
    - Comment out the default [homes] share, and add a comment about "valid users = %s"
      to show users how to restrict access to \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are allowed to create
      public shares in additon to authenticated ones.
    - add map to guest = Bad user, maps bad username to gues access.
  + debian/samba-common.conf:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control: 
    - Make libswbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb, since its not in main yet.
  + debian/rules:
    - Enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install
  + Add apoort hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + debian/rules, debian/samba.if-up: allow "NetworkManager" as a recognized address
    family... it's obviously /not/ an address family, but it's what gets
    sent when using NM, so we'll cope for now.  (LP: #462169). Taken from karmic-proposed.
  + debian/control: Recommend keyutils for smbfs (LP: #493565)
  + Dropped patches:
    - debian/patches/security-CVE-2009-3297.patch: No longer needed
    - debian/patches/fix-too-many-open-files.patch: No longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
1
2
.\"     Title: smbpasswd
2
3
.\"    Author: [see the "AUTHOR" section]
3
 
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4
 
.\"      Date: 10/29/2009
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
 
5
.\"      Date: 01/18/2010
5
6
.\"    Manual: System Administration tools
6
7
.\"    Source: Samba 3.4
7
8
.\"  Language: English
8
9
.\"
9
 
.TH "SMBPASSWD" "8" "10/29/2009" "Samba 3\&.4" "System Administration tools"
10
 
.\" -----------------------------------------------------------------
11
 
.\" * (re)Define some macros
12
 
.\" -----------------------------------------------------------------
13
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
 
.\" toupper - uppercase a string (locale-aware)
15
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
 
.de toupper
17
 
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18
 
\\$*
19
 
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20
 
..
21
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22
 
.\" SH-xref - format a cross-reference to an SH section
23
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
 
.de SH-xref
25
 
.ie n \{\
26
 
.\}
27
 
.toupper \\$*
28
 
.el \{\
29
 
\\$*
30
 
.\}
31
 
..
32
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
 
.\" SH - level-one heading that works better for non-TTY output
34
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
 
.de1 SH
36
 
.if t \{\
37
 
.sp 1
38
 
.\}
39
 
.sp \\n[PD]u
40
 
.nr an-level 1
41
 
.set-an-margin
42
 
.nr an-prevailing-indent \\n[IN]
43
 
.fi
44
 
.in \\n[an-margin]u
45
 
.ti 0
46
 
.HTML-TAG ".NH \\n[an-level]"
47
 
.it 1 an-trap
48
 
.nr an-no-space-flag 1
49
 
.nr an-break-flag 1
50
 
.ps +3
51
 
.ft B
52
 
.ne (2v + 1u)
53
 
.ie n \{\
54
 
.\" if n (TTY output), use uppercase
55
 
.toupper \\$*
56
 
.\}
57
 
.el \{\
58
 
.nr an-break-flag 0
59
 
.\" if not n (not TTY), use normal case (not uppercase)
60
 
\\$1
61
 
.in \\n[an-margin]u
62
 
.ti 0
63
 
.\" if not n (not TTY), put a border/line under subheading
64
 
.sp -.6
65
 
\l'\n(.lu'
66
 
.\}
67
 
..
68
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
 
.\" SS - level-two heading that works better for non-TTY output
70
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
 
.de1 SS
72
 
.sp \\n[PD]u
73
 
.nr an-level 1
74
 
.set-an-margin
75
 
.nr an-prevailing-indent \\n[IN]
76
 
.fi
77
 
.in \\n[IN]u
78
 
.ti \\n[SN]u
79
 
.it 1 an-trap
80
 
.nr an-no-space-flag 1
81
 
.nr an-break-flag 1
82
 
.ps \\n[PS-SS]u
83
 
.ps +2
84
 
.ft B
85
 
.ne (2v + 1u)
86
 
.if \\n[.$] \&\\$*
87
 
..
88
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
 
.\" BB/BE - put background/screen (filled box) around block of text
90
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91
 
.de BB
92
 
.if t \{\
93
 
.sp -.5
94
 
.br
95
 
.in +2n
96
 
.ll -2n
97
 
.gcolor red
98
 
.di BX
99
 
.\}
100
 
..
101
 
.de EB
102
 
.if t \{\
103
 
.if "\\$2"adjust-for-leading-newline" \{\
104
 
.sp -1
105
 
.\}
106
 
.br
107
 
.di
108
 
.in
109
 
.ll
110
 
.gcolor
111
 
.nr BW \\n(.lu-\\n(.i
112
 
.nr BH \\n(dn+.5v
113
 
.ne \\n(BHu+.5v
114
 
.ie "\\$2"adjust-for-leading-newline" \{\
115
 
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
116
 
.\}
117
 
.el \{\
118
 
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119
 
.\}
120
 
.in 0
121
 
.sp -.5v
122
 
.nf
123
 
.BX
124
 
.in
125
 
.sp .5v
126
 
.fi
127
 
.\}
128
 
..
129
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
 
.\" BM/EM - put colored marker in margin next to block of text
131
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132
 
.de BM
133
 
.if t \{\
134
 
.br
135
 
.ll -2n
136
 
.gcolor red
137
 
.di BX
138
 
.\}
139
 
..
140
 
.de EM
141
 
.if t \{\
142
 
.br
143
 
.di
144
 
.ll
145
 
.gcolor
146
 
.nr BH \\n(dn
147
 
.ne \\n(BHu
148
 
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
149
 
.in 0
150
 
.nf
151
 
.BX
152
 
.in
153
 
.fi
154
 
.\}
155
 
..
 
10
.TH "SMBPASSWD" "8" "01/18/2010" "Samba 3\&.4" "System Administration tools"
156
11
.\" -----------------------------------------------------------------
157
12
.\" * set default formatting
158
13
.\" -----------------------------------------------------------------
163
18
.\" -----------------------------------------------------------------
164
19
.\" * MAIN CONTENT STARTS HERE *
165
20
.\" -----------------------------------------------------------------
166
 
.SH "Name"
 
21
.SH "NAME"
167
22
smbpasswd \- change a user\'s SMB password
168
 
.SH "Synopsis"
169
 
.fam C
 
23
.SH "SYNOPSIS"
170
24
.HP \w'\ 'u
171
 
\FCsmbpasswd\F[] [\-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]
172
 
.fam
 
25
smbpasswd [\-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]
173
26
.SH "DESCRIPTION"
174
27
.PP
175
28
This tool is part of the
181
34
user 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\&.
182
35
.PP
183
36
By 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
184
 
\FCpasswd(1)\F[]
 
37
passwd(1)
185
38
program works\&.
186
 
\FC smbpasswd\F[]
 
39
smbpasswd
187
40
differs from how the passwd program works however in that it is not
188
41
\fIsetuid root\fR
189
42
but works in a client\-server mode and communicates with a locally running
198
51
options below\&.
199
52
.PP
200
53
When 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,
201
 
\FC smbpasswd\F[]
 
54
smbpasswd
202
55
accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running\&.
203
56
.SH "OPTIONS"
204
57
.PP
205
58
\-a
206
59
.RS 4
207
60
This 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
208
 
\FC/etc/passwd\F[]), else the request to add the user will fail\&.
 
61
/etc/passwd), else the request to add the user will fail\&.
209
62
.sp
210
63
This option is only available when running smbpasswd as root\&.
211
64
.RE
213
66
\-c
214
67
.RS 4
215
68
This option can be used to specify the path and file name of the
216
 
\FCsmb\&.conf\F[]
 
69
smb\&.conf
217
70
configuration file when it is important to use other than the default file and / or location\&.
218
71
.RE
219
72
.PP
246
99
in 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\&.
247
100
.sp
248
101
If the smbpasswd file is in the \'old\' format, then
249
 
\FC smbpasswd\F[]
 
102
smbpasswd
250
103
will FAIL to enable the account\&. See
251
104
\fBsmbpasswd\fR(5)
252
105
for details on the \'old\' and new password file formats\&.
269
122
This 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\&.
270
123
.sp
271
124
Note 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
272
 
\FCsmb\&.conf\F[]
 
125
smb\&.conf
273
126
file :
274
127
.sp
275
 
\FCnull passwords = yes\F[]
 
128
null passwords = yes
276
129
.sp
277
130
This option is only available when running smbpasswd as root\&.
278
131
.RE
323
176
.IP \(bu 2.3
324
177
.\}
325
178
\fBhost\fR: Do a standard host name to IP address resolution, using the system
326
 
\FC/etc/hosts \F[], 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
327
 
\FC/etc/nsswitch\&.conf\F[]
 
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
328
181
file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
329
182
.RE
330
183
.sp
355
208
.sp
356
209
.RE
357
210
The default order is
358
 
\FClmhosts, host, wins, bcast\F[]
 
211
lmhosts, host, wins, bcast
359
212
and without this parameter or any entry in the
360
213
\fBsmb.conf\fR(5)
361
214
file the name resolution methods will be attempted in this order\&.
378
231
\-h
379
232
.RS 4
380
233
This option prints the help string for
381
 
\FC smbpasswd\F[], selecting the correct one for running as root or as an ordinary user\&.
 
234
smbpasswd, selecting the correct one for running as root or as an ordinary user\&.
382
235
.RE
383
236
.PP
384
237
\-s
385
238
.RS 4
386
239
This 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
387
 
\FC/dev/tty\F[]
 
240
/dev/tty
388
241
(like the
389
 
\FCpasswd(1)\F[]
 
242
passwd(1)
390
243
program does)\&. This option is to aid people writing scripts to drive smbpasswd
391
244
.RE
392
245
.PP
396
249
\fI\-w\fR
397
250
switch is used to specify the password to be used with the
398
251
\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
399
 
\FCsecrets\&.tdb\F[]
 
252
secrets\&.tdb
400
253
and is keyed off of the admin\'s DN\&. This means that if the value of
401
254
\fIldap admin dn\fR
402
255
ever changes, the password will need to be manually updated as well\&.
404
257
.PP
405
258
\-W
406
259
.RS 4
407
 
\FCNOTE: \F[]
 
260
NOTE:
408
261
This option is same as "\-w" except that the password should be entered using stdin\&.
409
262
.sp
410
263
This parameter is only available if Samba has been compiled with LDAP support\&. The
411
264
\fI\-W\fR
412
265
switch is used to specify the password to be used with the
413
266
\m[blue]\fBldap admin dn\fR\m[]\&. Note that the password is stored in the
414
 
\FCsecrets\&.tdb\F[]
 
267
secrets\&.tdb
415
268
and is keyed off of the admin\'s DN\&. This means that if the value of
416
269
\fIldap admin dn\fR
417
270
ever changes, the password will need to be manually updated as well\&.
438
291
.SH "NOTES"
439
292
.PP
440
293
Since
441
 
\FCsmbpasswd\F[]
 
294
smbpasswd
442
295
works 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
443
 
\FC smbd\F[]
 
296
smbd
444
297
running on the local machine by specifying either
445
298
\fIallow hosts\fR
446
299
or