1 | '\" t
|
---|
2 | .\" Title: ntlm_auth
|
---|
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: User Commands
|
---|
7 | .\" Source: Samba 4.4
|
---|
8 | .\" Language: English
|
---|
9 | .\"
|
---|
10 | .TH "NTLM_AUTH" "1" "10/25/2016" "Samba 4\&.4" "User Commands"
|
---|
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"
|
---|
31 | ntlm_auth \- tool to allow external access to Winbind\*(Aqs NTLM authentication function
|
---|
32 | .SH "SYNOPSIS"
|
---|
33 | .HP \w'\ 'u
|
---|
34 | ntlm_auth
|
---|
35 | .SH "DESCRIPTION"
|
---|
36 | .PP
|
---|
37 | This tool is part of the
|
---|
38 | \fBsamba\fR(7)
|
---|
39 | suite\&.
|
---|
40 | .PP
|
---|
41 | ntlm_auth
|
---|
42 | is a helper utility that authenticates users using NT/LM authentication\&. It returns 0 if the users is authenticated successfully and 1 if access was denied\&. ntlm_auth uses winbind to access the user and authentication data for a domain\&. This utility is only intended to be used by other programs (currently
|
---|
43 | Squid
|
---|
44 | and
|
---|
45 | mod_ntlm_winbind)
|
---|
46 | .SH "OPERATIONAL REQUIREMENTS"
|
---|
47 | .PP
|
---|
48 | The
|
---|
49 | \fBwinbindd\fR(8)
|
---|
50 | daemon must be operational for many of these commands to function\&.
|
---|
51 | .PP
|
---|
52 | Some of these commands also require access to the directory
|
---|
53 | winbindd_privileged
|
---|
54 | in
|
---|
55 | $LOCKDIR\&. This should be done either by running this command as root or providing group access to the
|
---|
56 | winbindd_privileged
|
---|
57 | directory\&. For security reasons, this directory should not be world\-accessable\&.
|
---|
58 | .SH "OPTIONS"
|
---|
59 | .PP
|
---|
60 | \-\-helper\-protocol=PROTO
|
---|
61 | .RS 4
|
---|
62 | Operate as a stdio\-based helper\&. Valid helper protocols are:
|
---|
63 | .PP
|
---|
64 | squid\-2\&.4\-basic
|
---|
65 | .RS 4
|
---|
66 | Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&.
|
---|
67 | .RE
|
---|
68 | .PP
|
---|
69 | squid\-2\&.5\-basic
|
---|
70 | .RS 4
|
---|
71 | Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&.
|
---|
72 | .RE
|
---|
73 | .PP
|
---|
74 | squid\-2\&.5\-ntlmssp
|
---|
75 | .RS 4
|
---|
76 | Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&.
|
---|
77 | .sp
|
---|
78 | Requires access to the directory
|
---|
79 | winbindd_privileged
|
---|
80 | in
|
---|
81 | $LOCKDIR\&. The protocol used is described here:
|
---|
82 | http://devel\&.squid\-cache\&.org/ntlm/squid_helper_protocol\&.html\&. This protocol has been extended to allow the NTLMSSP Negotiate packet to be included as an argument to the
|
---|
83 | YR
|
---|
84 | command\&. (Thus avoiding loss of information in the protocol exchange)\&.
|
---|
85 | .RE
|
---|
86 | .PP
|
---|
87 | ntlmssp\-client\-1
|
---|
88 | .RS 4
|
---|
89 | Client\-side helper for use with arbitrary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowledge\&.
|
---|
90 | .sp
|
---|
91 | This helper is a client, and as such may be run by any user\&. The protocol used is effectively the reverse of the previous protocol\&. A
|
---|
92 | YR
|
---|
93 | command (without any arguments) starts the authentication exchange\&.
|
---|
94 | .RE
|
---|
95 | .PP
|
---|
96 | gss\-spnego
|
---|
97 | .RS 4
|
---|
98 | Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as
|
---|
99 | squid\-2\&.5\-ntlmssp, but has some subtle differences that are undocumented outside the source at this stage\&.
|
---|
100 | .sp
|
---|
101 | Requires access to the directory
|
---|
102 | winbindd_privileged
|
---|
103 | in
|
---|
104 | $LOCKDIR\&.
|
---|
105 | .RE
|
---|
106 | .PP
|
---|
107 | gss\-spnego\-client
|
---|
108 | .RS 4
|
---|
109 | Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&.
|
---|
110 | .RE
|
---|
111 | .PP
|
---|
112 | ntlm\-server\-1
|
---|
113 | .RS 4
|
---|
114 | Server\-side helper protocol, intended for use by a RADIUS server or the \*(Aqwinbind\*(Aq plugin for pppd, for the provision of MSCHAP and MSCHAPv2 authentication\&.
|
---|
115 | .sp
|
---|
116 | This protocol consists of lines in the form:
|
---|
117 | Parameter: value
|
---|
118 | and
|
---|
119 | Parameter:: Base64\-encode value\&. The presence of a single period
|
---|
120 | \&.
|
---|
121 | indicates that one side has finished supplying data to the other\&. (Which in turn could cause the helper to authenticate the user)\&.
|
---|
122 | .sp
|
---|
123 | Currently implemented parameters from the external program to the helper are:
|
---|
124 | .PP
|
---|
125 | Username
|
---|
126 | .RS 4
|
---|
127 | The username, expected to be in Samba\*(Aqs
|
---|
128 | \m[blue]\fBunix charset\fR\m[]\&.
|
---|
129 | .PP
|
---|
130 | Examples:
|
---|
131 | .RS 4
|
---|
132 | Username: bob
|
---|
133 | .sp
|
---|
134 | Username:: Ym9i
|
---|
135 | .RE
|
---|
136 | .RE
|
---|
137 | .PP
|
---|
138 | NT\-Domain
|
---|
139 | .RS 4
|
---|
140 | The user\*(Aqs domain, expected to be in Samba\*(Aqs
|
---|
141 | \m[blue]\fBunix charset\fR\m[]\&.
|
---|
142 | .PP
|
---|
143 | Examples:
|
---|
144 | .RS 4
|
---|
145 | NT\-Domain: WORKGROUP
|
---|
146 | .sp
|
---|
147 | NT\-Domain:: V09SS0dST1VQ
|
---|
148 | .RE
|
---|
149 | .RE
|
---|
150 | .PP
|
---|
151 | Full\-Username
|
---|
152 | .RS 4
|
---|
153 | The fully qualified username, expected to be in Samba\*(Aqs
|
---|
154 | \m[blue]\fBunix charset\fR\m[]
|
---|
155 | and qualified with the
|
---|
156 | \m[blue]\fBwinbind separator\fR\m[]\&.
|
---|
157 | .PP
|
---|
158 | Examples:
|
---|
159 | .RS 4
|
---|
160 | Full\-Username: WORKGROUP\ebob
|
---|
161 | .sp
|
---|
162 | Full\-Username:: V09SS0dST1VQYm9i
|
---|
163 | .RE
|
---|
164 | .RE
|
---|
165 | .PP
|
---|
166 | LANMAN\-Challenge
|
---|
167 | .RS 4
|
---|
168 | The 8 byte
|
---|
169 | LANMAN Challenge
|
---|
170 | value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&.
|
---|
171 | .PP
|
---|
172 | Examples:
|
---|
173 | .RS 4
|
---|
174 | LANMAN\-Challenge: 0102030405060708
|
---|
175 | .RE
|
---|
176 | .RE
|
---|
177 | .PP
|
---|
178 | LANMAN\-Response
|
---|
179 | .RS 4
|
---|
180 | The 24 byte
|
---|
181 | LANMAN Response
|
---|
182 | value, calculated from the user\*(Aqs password and the supplied
|
---|
183 | LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
|
---|
184 | .PP
|
---|
185 | Examples:
|
---|
186 | .RS 4
|
---|
187 | LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
|
---|
188 | .RE
|
---|
189 | .RE
|
---|
190 | .PP
|
---|
191 | NT\-Response
|
---|
192 | .RS 4
|
---|
193 | The >= 24 byte
|
---|
194 | NT Response
|
---|
195 | calculated from the user\*(Aqs password and the supplied
|
---|
196 | LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
|
---|
197 | .PP
|
---|
198 | Examples:
|
---|
199 | .RS 4
|
---|
200 | NT\-Response: 0102030405060708090A0B0C0D0E0F10111213141516171
|
---|
201 | .RE
|
---|
202 | .RE
|
---|
203 | .PP
|
---|
204 | Password
|
---|
205 | .RS 4
|
---|
206 | The user\*(Aqs password\&. This would be provided by a network client, if the helper is being used in a legacy situation that exposes plaintext passwords in this way\&.
|
---|
207 | .PP
|
---|
208 | Examples:
|
---|
209 | .RS 4
|
---|
210 | Password: samba2
|
---|
211 | .sp
|
---|
212 | Password:: c2FtYmEy
|
---|
213 | .RE
|
---|
214 | .RE
|
---|
215 | .PP
|
---|
216 | Request\-User\-Session\-Key
|
---|
217 | .RS 4
|
---|
218 | Upon successful authenticaiton, return the user session key associated with the login\&.
|
---|
219 | .PP
|
---|
220 | Examples:
|
---|
221 | .RS 4
|
---|
222 | Request\-User\-Session\-Key: Yes
|
---|
223 | .RE
|
---|
224 | .RE
|
---|
225 | .PP
|
---|
226 | Request\-LanMan\-Session\-Key
|
---|
227 | .RS 4
|
---|
228 | Upon successful authenticaiton, return the LANMAN session key associated with the login\&.
|
---|
229 | .PP
|
---|
230 | Examples:
|
---|
231 | .RS 4
|
---|
232 | Request\-LanMan\-Session\-Key: Yes
|
---|
233 | .RE
|
---|
234 | .RE
|
---|
235 | .RE
|
---|
236 | .sp
|
---|
237 | .if n \{\
|
---|
238 | .sp
|
---|
239 | .\}
|
---|
240 | .RS 4
|
---|
241 | .it 1 an-trap
|
---|
242 | .nr an-no-space-flag 1
|
---|
243 | .nr an-break-flag 1
|
---|
244 | .br
|
---|
245 | .ps +1
|
---|
246 | \fBWarning\fR
|
---|
247 | .ps -1
|
---|
248 | .br
|
---|
249 | Implementers should take care to base64 encode any data (such as usernames/passwords) that may contain malicous user data, such as a newline\&. They may also need to decode strings from the helper, which likewise may have been base64 encoded\&.
|
---|
250 | .sp .5v
|
---|
251 | .RE
|
---|
252 | .RE
|
---|
253 | .PP
|
---|
254 | \-\-username=USERNAME
|
---|
255 | .RS 4
|
---|
256 | Specify username of user to authenticate
|
---|
257 | .RE
|
---|
258 | .PP
|
---|
259 | \-\-domain=DOMAIN
|
---|
260 | .RS 4
|
---|
261 | Specify domain of user to authenticate
|
---|
262 | .RE
|
---|
263 | .PP
|
---|
264 | \-\-workstation=WORKSTATION
|
---|
265 | .RS 4
|
---|
266 | Specify the workstation the user authenticated from
|
---|
267 | .RE
|
---|
268 | .PP
|
---|
269 | \-\-challenge=STRING
|
---|
270 | .RS 4
|
---|
271 | NTLM challenge (in HEXADECIMAL)
|
---|
272 | .RE
|
---|
273 | .PP
|
---|
274 | \-\-lm\-response=RESPONSE
|
---|
275 | .RS 4
|
---|
276 | LM Response to the challenge (in HEXADECIMAL)
|
---|
277 | .RE
|
---|
278 | .PP
|
---|
279 | \-\-nt\-response=RESPONSE
|
---|
280 | .RS 4
|
---|
281 | NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
|
---|
282 | .RE
|
---|
283 | .PP
|
---|
284 | \-\-password=PASSWORD
|
---|
285 | .RS 4
|
---|
286 | User\*(Aqs plaintext password
|
---|
287 | .sp
|
---|
288 | If not specified on the command line, this is prompted for when required\&.
|
---|
289 | .sp
|
---|
290 | For the NTLMSSP based server roles, this parameter specifies the expected password, allowing testing without winbindd operational\&.
|
---|
291 | .RE
|
---|
292 | .PP
|
---|
293 | \-\-request\-lm\-key
|
---|
294 | .RS 4
|
---|
295 | Retrieve LM session key
|
---|
296 | .RE
|
---|
297 | .PP
|
---|
298 | \-\-request\-nt\-key
|
---|
299 | .RS 4
|
---|
300 | Request NT key
|
---|
301 | .RE
|
---|
302 | .PP
|
---|
303 | \-\-diagnostics
|
---|
304 | .RS 4
|
---|
305 | Perform Diagnostics on the authentication chain\&. Uses the password from
|
---|
306 | \-\-password
|
---|
307 | or prompts for one\&.
|
---|
308 | .RE
|
---|
309 | .PP
|
---|
310 | \-\-require\-membership\-of={SID|Name}
|
---|
311 | .RS 4
|
---|
312 | Require that a user be a member of specified group (either name or SID) for authentication to succeed\&.
|
---|
313 | .RE
|
---|
314 | .PP
|
---|
315 | \-\-pam\-winbind\-conf=FILENAME
|
---|
316 | .RS 4
|
---|
317 | Define the path to the pam_winbind\&.conf file\&.
|
---|
318 | .RE
|
---|
319 | .PP
|
---|
320 | \-\-target\-hostname=HOSTNAME
|
---|
321 | .RS 4
|
---|
322 | Define the target hostname\&.
|
---|
323 | .RE
|
---|
324 | .PP
|
---|
325 | \-\-target\-service=SERVICE
|
---|
326 | .RS 4
|
---|
327 | Define the target service\&.
|
---|
328 | .RE
|
---|
329 | .PP
|
---|
330 | \-\-use\-cached\-creds
|
---|
331 | .RS 4
|
---|
332 | Whether to use credentials cached by winbindd\&.
|
---|
333 | .RE
|
---|
334 | .PP
|
---|
335 | \-\-offline\-logon
|
---|
336 | .RS 4
|
---|
337 | Allow offline logons for plain text auth\&.
|
---|
338 | .RE
|
---|
339 | .PP
|
---|
340 | \-\-configfile=<configuration file>
|
---|
341 | .RS 4
|
---|
342 | The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See for more information\&. The default configuration file name is determined at compile time\&.
|
---|
343 | .RE
|
---|
344 | .SH "EXAMPLE SETUP"
|
---|
345 | .PP
|
---|
346 | To setup ntlm_auth for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the
|
---|
347 | squid\&.conf
|
---|
348 | file\&.
|
---|
349 | .sp
|
---|
350 | .if n \{\
|
---|
351 | .RS 4
|
---|
352 | .\}
|
---|
353 | .nf
|
---|
354 | auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp
|
---|
355 | auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic
|
---|
356 | auth_param basic children 5
|
---|
357 | auth_param basic realm Squid proxy\-caching web server
|
---|
358 | auth_param basic credentialsttl 2 hours
|
---|
359 | .fi
|
---|
360 | .if n \{\
|
---|
361 | .RE
|
---|
362 | .\}
|
---|
363 | .if n \{\
|
---|
364 | .sp
|
---|
365 | .\}
|
---|
366 | .RS 4
|
---|
367 | .it 1 an-trap
|
---|
368 | .nr an-no-space-flag 1
|
---|
369 | .nr an-break-flag 1
|
---|
370 | .br
|
---|
371 | .ps +1
|
---|
372 | \fBNote\fR
|
---|
373 | .ps -1
|
---|
374 | .br
|
---|
375 | .PP
|
---|
376 | This example assumes that ntlm_auth has been installed into your path, and that the group permissions on
|
---|
377 | winbindd_privileged
|
---|
378 | are as described above\&.
|
---|
379 | .sp .5v
|
---|
380 | .RE
|
---|
381 | .PP
|
---|
382 | To setup ntlm_auth for use by squid 2\&.5 with group limitation in addition to the above example, the following should be added to the
|
---|
383 | squid\&.conf
|
---|
384 | file\&.
|
---|
385 | .sp
|
---|
386 | .if n \{\
|
---|
387 | .RS 4
|
---|
388 | .\}
|
---|
389 | .nf
|
---|
390 | auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
|
---|
391 | auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
|
---|
392 | .fi
|
---|
393 | .if n \{\
|
---|
394 | .RE
|
---|
395 | .\}
|
---|
396 | .SH "TROUBLESHOOTING"
|
---|
397 | .PP
|
---|
398 | If you\*(Aqre experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millennium Edition against ntlm_auth\*(Aqs NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read
|
---|
399 | the Microsoft Knowledge Base article #239869 and follow instructions described there\&.
|
---|
400 | .SH "VERSION"
|
---|
401 | .PP
|
---|
402 | This man page is correct for version 3 of the Samba suite\&.
|
---|
403 | .SH "AUTHOR"
|
---|
404 | .PP
|
---|
405 | The 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\&.
|
---|
406 | .PP
|
---|
407 | The ntlm_auth manpage was written by Jelmer Vernooij and Andrew Bartlett\&.
|
---|