source: branches/samba-3.0/docs/manpages/ntlm_auth.1@ 158

Last change on this file since 158 was 158, checked in by Paul Smedley, 17 years ago

Update source to 3.0.32

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