source: vendor/current/docs/manpages/ntlm_auth.1

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 10.7 KB
Line 
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"
31ntlm_auth \- tool to allow external access to Winbind\*(Aqs NTLM authentication function
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34ntlm_auth
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41ntlm_auth
42is 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
43Squid
44and
45mod_ntlm_winbind)
46.SH "OPERATIONAL REQUIREMENTS"
47.PP
48The
49\fBwinbindd\fR(8)
50daemon must be operational for many of these commands to function\&.
51.PP
52Some of these commands also require access to the directory
53winbindd_privileged
54in
55$LOCKDIR\&. This should be done either by running this command as root or providing group access to the
56winbindd_privileged
57directory\&. For security reasons, this directory should not be world\-accessable\&.
58.SH "OPTIONS"
59.PP
60\-\-helper\-protocol=PROTO
61.RS 4
62Operate as a stdio\-based helper\&. Valid helper protocols are:
63.PP
64squid\-2\&.4\-basic
65.RS 4
66Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&.
67.RE
68.PP
69squid\-2\&.5\-basic
70.RS 4
71Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&.
72.RE
73.PP
74squid\-2\&.5\-ntlmssp
75.RS 4
76Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&.
77.sp
78Requires access to the directory
79winbindd_privileged
80in
81$LOCKDIR\&. The protocol used is described here:
82http://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
83YR
84command\&. (Thus avoiding loss of information in the protocol exchange)\&.
85.RE
86.PP
87ntlmssp\-client\-1
88.RS 4
89Client\-side helper for use with arbitrary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowledge\&.
90.sp
91This 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
92YR
93command (without any arguments) starts the authentication exchange\&.
94.RE
95.PP
96gss\-spnego
97.RS 4
98Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as
99squid\-2\&.5\-ntlmssp, but has some subtle differences that are undocumented outside the source at this stage\&.
100.sp
101Requires access to the directory
102winbindd_privileged
103in
104$LOCKDIR\&.
105.RE
106.PP
107gss\-spnego\-client
108.RS 4
109Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&.
110.RE
111.PP
112ntlm\-server\-1
113.RS 4
114Server\-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
116This protocol consists of lines in the form:
117Parameter: value
118and
119Parameter:: Base64\-encode value\&. The presence of a single period
120\&.
121indicates that one side has finished supplying data to the other\&. (Which in turn could cause the helper to authenticate the user)\&.
122.sp
123Currently implemented parameters from the external program to the helper are:
124.PP
125Username
126.RS 4
127The username, expected to be in Samba\*(Aqs
128\m[blue]\fBunix charset\fR\m[]\&.
129.PP
130Examples:
131.RS 4
132Username: bob
133.sp
134Username:: Ym9i
135.RE
136.RE
137.PP
138NT\-Domain
139.RS 4
140The user\*(Aqs domain, expected to be in Samba\*(Aqs
141\m[blue]\fBunix charset\fR\m[]\&.
142.PP
143Examples:
144.RS 4
145NT\-Domain: WORKGROUP
146.sp
147NT\-Domain:: V09SS0dST1VQ
148.RE
149.RE
150.PP
151Full\-Username
152.RS 4
153The fully qualified username, expected to be in Samba\*(Aqs
154\m[blue]\fBunix charset\fR\m[]
155and qualified with the
156\m[blue]\fBwinbind separator\fR\m[]\&.
157.PP
158Examples:
159.RS 4
160Full\-Username: WORKGROUP\ebob
161.sp
162Full\-Username:: V09SS0dST1VQYm9i
163.RE
164.RE
165.PP
166LANMAN\-Challenge
167.RS 4
168The 8 byte
169LANMAN Challenge
170value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&.
171.PP
172Examples:
173.RS 4
174LANMAN\-Challenge: 0102030405060708
175.RE
176.RE
177.PP
178LANMAN\-Response
179.RS 4
180The 24 byte
181LANMAN Response
182value, calculated from the user\*(Aqs password and the supplied
183LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
184.PP
185Examples:
186.RS 4
187LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
188.RE
189.RE
190.PP
191NT\-Response
192.RS 4
193The >= 24 byte
194NT Response
195calculated from the user\*(Aqs password and the supplied
196LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
197.PP
198Examples:
199.RS 4
200NT\-Response: 0102030405060708090A0B0C0D0E0F10111213141516171
201.RE
202.RE
203.PP
204Password
205.RS 4
206The 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
208Examples:
209.RS 4
210Password: samba2
211.sp
212Password:: c2FtYmEy
213.RE
214.RE
215.PP
216Request\-User\-Session\-Key
217.RS 4
218Upon successful authenticaiton, return the user session key associated with the login\&.
219.PP
220Examples:
221.RS 4
222Request\-User\-Session\-Key: Yes
223.RE
224.RE
225.PP
226Request\-LanMan\-Session\-Key
227.RS 4
228Upon successful authenticaiton, return the LANMAN session key associated with the login\&.
229.PP
230Examples:
231.RS 4
232Request\-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
249Implementers 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
256Specify username of user to authenticate
257.RE
258.PP
259\-\-domain=DOMAIN
260.RS 4
261Specify domain of user to authenticate
262.RE
263.PP
264\-\-workstation=WORKSTATION
265.RS 4
266Specify the workstation the user authenticated from
267.RE
268.PP
269\-\-challenge=STRING
270.RS 4
271NTLM challenge (in HEXADECIMAL)
272.RE
273.PP
274\-\-lm\-response=RESPONSE
275.RS 4
276LM Response to the challenge (in HEXADECIMAL)
277.RE
278.PP
279\-\-nt\-response=RESPONSE
280.RS 4
281NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
282.RE
283.PP
284\-\-password=PASSWORD
285.RS 4
286User\*(Aqs plaintext password
287.sp
288If not specified on the command line, this is prompted for when required\&.
289.sp
290For 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
295Retrieve LM session key
296.RE
297.PP
298\-\-request\-nt\-key
299.RS 4
300Request NT key
301.RE
302.PP
303\-\-diagnostics
304.RS 4
305Perform Diagnostics on the authentication chain\&. Uses the password from
306\-\-password
307or prompts for one\&.
308.RE
309.PP
310\-\-require\-membership\-of={SID|Name}
311.RS 4
312Require 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
317Define the path to the pam_winbind\&.conf file\&.
318.RE
319.PP
320\-\-target\-hostname=HOSTNAME
321.RS 4
322Define the target hostname\&.
323.RE
324.PP
325\-\-target\-service=SERVICE
326.RS 4
327Define the target service\&.
328.RE
329.PP
330\-\-use\-cached\-creds
331.RS 4
332Whether to use credentials cached by winbindd\&.
333.RE
334.PP
335\-\-offline\-logon
336.RS 4
337Allow offline logons for plain text auth\&.
338.RE
339.PP
340\-\-configfile=<configuration file>
341.RS 4
342The 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
346To setup ntlm_auth for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the
347squid\&.conf
348file\&.
349.sp
350.if n \{\
351.RS 4
352.\}
353.nf
354auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp
355auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic
356auth_param basic children 5
357auth_param basic realm Squid proxy\-caching web server
358auth_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
376This example assumes that ntlm_auth has been installed into your path, and that the group permissions on
377winbindd_privileged
378are as described above\&.
379.sp .5v
380.RE
381.PP
382To 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
383squid\&.conf
384file\&.
385.sp
386.if n \{\
387.RS 4
388.\}
389.nf
390auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
391auth_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
398If 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
399the Microsoft Knowledge Base article #239869 and follow instructions described there\&.
400.SH "VERSION"
401.PP
402This man page is correct for version 3 of the Samba suite\&.
403.SH "AUTHOR"
404.PP
405The 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
407The ntlm_auth manpage was written by Jelmer Vernooij and Andrew Bartlett\&.
Note: See TracBrowser for help on using the repository browser.