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

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 11.2 KB
Line 
1'\" t
2.\" Title: ntlm_auth
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 02/19/2010
6.\" Manual: User Commands
7.\" Source: Samba 3.5
8.\" Language: English
9.\"
10.TH "NTLM_AUTH" "1" "02/19/2010" "Samba 3\&.5" "User Commands"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22ntlm_auth \- tool to allow external access to Winbind\'s NTLM authentication function
23.SH "SYNOPSIS"
24.HP \w'\ 'u
25ntlm_auth [\-d\ debuglevel] [\-l\ logdir] [\-s\ <smb\ config\ file>]
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite\&.
31.PP
32ntlm_auth
33is 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
34Squid
35and
36mod_ntlm_winbind)
37.SH "OPERATIONAL REQUIREMENTS"
38.PP
39The
40\fBwinbindd\fR(8)
41daemon must be operational for many of these commands to function\&.
42.PP
43Some of these commands also require access to the directory
44winbindd_privileged
45in
46$LOCKDIR\&. This should be done either by running this command as root or providing group access to the
47winbindd_privileged
48directory\&. For security reasons, this directory should not be world\-accessable\&.
49.SH "OPTIONS"
50.PP
51\-\-helper\-protocol=PROTO
52.RS 4
53Operate as a stdio\-based helper\&. Valid helper protocols are:
54.PP
55squid\-2\&.4\-basic
56.RS 4
57Server\-side helper for use with Squid 2\&.4\'s basic (plaintext) authentication\&.
58.RE
59.PP
60squid\-2\&.5\-basic
61.RS 4
62Server\-side helper for use with Squid 2\&.5\'s basic (plaintext) authentication\&.
63.RE
64.PP
65squid\-2\&.5\-ntlmssp
66.RS 4
67Server\-side helper for use with Squid 2\&.5\'s NTLMSSP authentication\&.
68.sp
69Requires access to the directory
70winbindd_privileged
71in
72$LOCKDIR\&. The protocol used is described here:
73http://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
74YR
75command\&. (Thus avoiding loss of information in the protocol exchange)\&.
76.RE
77.PP
78ntlmssp\-client\-1
79.RS 4
80Client\-side helper for use with arbitrary external programs that may wish to use Samba\'s NTLMSSP authentication knowledge\&.
81.sp
82This 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
83YR
84command (without any arguments) starts the authentication exchange\&.
85.RE
86.PP
87gss\-spnego
88.RS 4
89Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as
90squid\-2\&.5\-ntlmssp, but has some subtle differences that are undocumented outside the source at this stage\&.
91.sp
92Requires access to the directory
93winbindd_privileged
94in
95$LOCKDIR\&.
96.RE
97.PP
98gss\-spnego\-client
99.RS 4
100Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&.
101.RE
102.PP
103ntlm\-server\-1
104.RS 4
105Server\-side helper protocol, intended for use by a RADIUS server or the \'winbind\' plugin for pppd, for the provision of MSCHAP and MSCHAPv2 authentication\&.
106.sp
107This protocol consists of lines in the form:
108Parameter: value
109and
110Parameter:: Base64\-encode value\&. The presence of a single period
111\&.
112indicates that one side has finished supplying data to the other\&. (Which in turn could cause the helper to authenticate the user)\&.
113.sp
114Curently implemented parameters from the external program to the helper are:
115.PP
116Username
117.RS 4
118The username, expected to be in Samba\'s
119\m[blue]\fBunix charset\fR\m[]\&.
120.PP \fBExample\ \&1.\ \&\fR Username: bob
121.PP \fBExample\ \&2.\ \&\fR Username:: Ym9i
122.RE
123.PP
124Username
125.RS 4
126The user\'s domain, expected to be in Samba\'s
127\m[blue]\fBunix charset\fR\m[]\&.
128.PP \fBExample\ \&3.\ \&\fR Domain: WORKGROUP
129.PP \fBExample\ \&4.\ \&\fR Domain:: V09SS0dST1VQ
130.RE
131.PP
132Full\-Username
133.RS 4
134The fully qualified username, expected to be in Samba\'s
135\m[blue]\fBunix charset\fR\m[]
136and qualified with the
137\m[blue]\fBwinbind separator\fR\m[]\&.
138.PP \fBExample\ \&5.\ \&\fR Full\-Username: WORKGROUP\ebob
139.PP \fBExample\ \&6.\ \&\fR Full\-Username:: V09SS0dST1VQYm9i
140.RE
141.PP
142LANMAN\-Challenge
143.RS 4
144The 8 byte
145LANMAN Challenge
146value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&.
147.PP \fBExample\ \&7.\ \&\fR LANMAN\-Challege: 0102030405060708
148.RE
149.PP
150LANMAN\-Response
151.RS 4
152The 24 byte
153LANMAN Response
154value, calculated from the user\'s password and the supplied
155LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
156.PP \fBExample\ \&8.\ \&\fR LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
157.RE
158.PP
159NT\-Response
160.RS 4
161The >= 24 byte
162NT Response
163calculated from the user\'s password and the supplied
164LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
165.PP \fBExample\ \&9.\ \&\fR NT\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
166.RE
167.PP
168Password
169.RS 4
170The user\'s 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\&.
171.PP \fBExample\ \&10.\ \&\fR Password: samba2
172.PP \fBExample\ \&11.\ \&\fR Password:: c2FtYmEy
173.RE
174.PP
175Request\-User\-Session\-Key
176.RS 4
177Apon sucessful authenticaiton, return the user session key associated with the login\&.
178.PP \fBExample\ \&12.\ \&\fR Request\-User\-Session\-Key: Yes
179.RE
180.PP
181Request\-LanMan\-Session\-Key
182.RS 4
183Apon sucessful authenticaiton, return the LANMAN session key associated with the login\&.
184.PP \fBExample\ \&13.\ \&\fR Request\-LanMan\-Session\-Key: Yes
185.RE
186.if n \{\
187.sp
188.\}
189.RS 4
190.it 1 an-trap
191.nr an-no-space-flag 1
192.nr an-break-flag 1
193.br
194.ps +1
195\fBWarning\fR
196.ps -1
197.br
198Implementors should take care to base64 encode
199 any data (such as usernames/passwords) that may contain malicous user data, such as
200 a newline\&. They may also need to decode strings from
201 the helper, which likewise may have been base64 encoded\&..sp .5v
202.RE
203.RE
204.RE
205.PP
206\-\-username=USERNAME
207.RS 4
208Specify username of user to authenticate
209.RE
210.PP
211\-\-domain=DOMAIN
212.RS 4
213Specify domain of user to authenticate
214.RE
215.PP
216\-\-workstation=WORKSTATION
217.RS 4
218Specify the workstation the user authenticated from
219.RE
220.PP
221\-\-challenge=STRING
222.RS 4
223NTLM challenge (in HEXADECIMAL)
224.RE
225.PP
226\-\-lm\-response=RESPONSE
227.RS 4
228LM Response to the challenge (in HEXADECIMAL)
229.RE
230.PP
231\-\-nt\-response=RESPONSE
232.RS 4
233NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
234.RE
235.PP
236\-\-password=PASSWORD
237.RS 4
238User\'s plaintext password
239.sp
240If not specified on the command line, this is prompted for when required\&.
241.sp
242For the NTLMSSP based server roles, this parameter specifies the expected password, allowing testing without winbindd operational\&.
243.RE
244.PP
245\-\-request\-lm\-key
246.RS 4
247Retreive LM session key
248.RE
249.PP
250\-\-request\-nt\-key
251.RS 4
252Request NT key
253.RE
254.PP
255\-\-diagnostics
256.RS 4
257Perform Diagnostics on the authentication chain\&. Uses the password from
258\-\-password
259or prompts for one\&.
260.RE
261.PP
262\-\-require\-membership\-of={SID|Name}
263.RS 4
264Require that a user be a member of specified group (either name or SID) for authentication to succeed\&.
265.RE
266.PP
267\-d|\-\-debuglevel=level
268.RS 4
269\fIlevel\fR
270is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
271.sp
272The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
273.sp
274Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
275.sp
276Note that specifying this parameter here will override the
277\m[blue]\fB\%smb.conf.5.html#\fR\m[]
278parameter in the
279smb\&.conf
280file\&.
281.RE
282.PP
283\-V|\-\-version
284.RS 4
285Prints the program version number\&.
286.RE
287.PP
288\-s|\-\-configfile <configuration file>
289.RS 4
290The 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
291smb\&.conf
292for more information\&. The default configuration file name is determined at compile time\&.
293.RE
294.PP
295\-l|\-\-log\-basename=logdirectory
296.RS 4
297Base directory name for log/debug files\&. The extension
298\fB"\&.progname"\fR
299will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
300.RE
301.PP
302\-h|\-\-help
303.RS 4
304Print a summary of command line options\&.
305.RE
306.SH "EXAMPLE SETUP"
307.PP
308To setup ntlm_auth for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the
309squid\&.conf
310file\&.
311.sp
312.if n \{\
313.RS 4
314.\}
315.nf
316auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp
317auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic
318auth_param basic children 5
319auth_param basic realm Squid proxy\-caching web server
320auth_param basic credentialsttl 2 hours
321.fi
322.if n \{\
323.RE
324.\}
325.if n \{\
326.sp
327.\}
328.RS 4
329.it 1 an-trap
330.nr an-no-space-flag 1
331.nr an-break-flag 1
332.br
333.ps +1
334\fBNote\fR
335.ps -1
336.br
337.PP
338This example assumes that ntlm_auth has been installed into your path, and that the group permissions on
339winbindd_privileged
340are as described above\&.
341.sp .5v
342.RE
343.PP
344To 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
345squid\&.conf
346file\&.
347.sp
348.if n \{\
349.RS 4
350.\}
351.nf
352auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\'WORKGROUP\eDomain Users\'
353auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\'WORKGROUP\eDomain Users\'
354.fi
355.if n \{\
356.RE
357.\}
358.SH "TROUBLESHOOTING"
359.PP
360If you\'re experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millenium Edition against ntlm_auth\'s NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read
361the Microsoft Knowledge Base article #239869 and follow instructions described there\&.
362.SH "VERSION"
363.PP
364This man page is correct for version 3 of the Samba suite\&.
365.SH "AUTHOR"
366.PP
367The 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\&.
368.PP
369The ntlm_auth manpage was written by Jelmer Vernooij and Andrew Bartlett\&.
Note: See TracBrowser for help on using the repository browser.