1NTLM_AUTH(1)                     User Commands                    NTLM_AUTH(1)
2
3
4

NAME

6       ntlm_auth - tool to allow external access to Winbind´s NTLM
7       authentication function
8

SYNOPSIS

10       ntlm_auth [-d debuglevel] [-l logdir] [-s <smb config file>]
11

DESCRIPTION

13       This tool is part of the samba(7) suite.
14
15       ntlm_auth is a helper utility that authenticates users using NT/LM
16       authentication. It returns 0 if the users is authenticated successfully
17       and 1 if access was denied. ntlm_auth uses winbind to access the user
18       and authentication data for a domain. This utility is only intended to
19       be used by other programs (currently Squid and mod_ntlm_winbind)
20

OPERATIONAL REQUIREMENTS

22       The winbindd(8) daemon must be operational for many of these commands
23       to function.
24
25       Some of these commands also require access to the directory
26       winbindd_privileged in $LOCKDIR. This should be done either by running
27       this command as root or providing group access to the
28       winbindd_privileged directory. For security reasons, this directory
29       should not be world-accessable.
30

OPTIONS

32       --helper-protocol=PROTO
33           Operate as a stdio-based helper. Valid helper protocols are:
34
35           squid-2.4-basic
36               Server-side helper for use with Squid 2.4´s basic (plaintext)
37               authentication.
38
39           squid-2.5-basic
40               Server-side helper for use with Squid 2.5´s basic (plaintext)
41               authentication.
42
43           squid-2.5-ntlmssp
44               Server-side helper for use with Squid 2.5´s NTLMSSP
45               authentication.
46
47               Requires access to the directory winbindd_privileged in
48               $LOCKDIR. The protocol used is described here:
49               http://devel.squid-cache.org/ntlm/squid_helper_protocol.html.
50               This protocol has been extended to allow the NTLMSSP Negotiate
51               packet to be included as an argument to the YR command. (Thus
52               avoiding loss of information in the protocol exchange).
53
54           ntlmssp-client-1
55               Client-side helper for use with arbitrary external programs
56               that may wish to use Samba´s NTLMSSP authentication knowledge.
57
58               This helper is a client, and as such may be run by any user.
59               The protocol used is effectively the reverse of the previous
60               protocol. A YR command (without any arguments) starts the
61               authentication exchange.
62
63           gss-spnego
64               Server-side helper that implements GSS-SPNEGO. This uses a
65               protocol that is almost the same as squid-2.5-ntlmssp, but has
66               some subtle differences that are undocumented outside the
67               source at this stage.
68
69               Requires access to the directory winbindd_privileged in
70               $LOCKDIR.
71
72           gss-spnego-client
73               Client-side helper that implements GSS-SPNEGO. This also uses a
74               protocol similar to the above helpers, but is currently
75               undocumented.
76
77           ntlm-server-1
78               Server-side helper protocol, intended for use by a RADIUS
79               server or the ´winbind´ plugin for pppd, for the provision of
80               MSCHAP and MSCHAPv2 authentication.
81
82               This protocol consists of lines in the form: Parameter: value
83               and Parameter:: Base64-encode value. The presence of a single
84               period .  indicates that one side has finished supplying data
85               to the other. (Which in turn could cause the helper to
86               authenticate the user).
87
88               Curently implemented parameters from the external program to
89               the helper are:
90
91               Username
92                   The username, expected to be in Samba´s unix charset.
93
94               NT-Domain
95                   The user´s domain, expected to be in Samba´s unix charset.
96
97               Full-Username
98                   The fully qualified username, expected to be in Samba´s
99                   unix charset and qualified with the winbind separator.
100
101               LANMAN-Challenge
102                   The 8 byte LANMAN Challenge value, generated randomly by
103                   the server, or (in cases such as MSCHAPv2) generated in
104                   some way by both the server and the client.
105
106               LANMAN-Response
107                   The 24 byte LANMAN Response value, calculated from the
108                   user´s password and the supplied LANMAN Challenge.
109                   Typically, this is provided over the network by a client
110                   wishing to authenticate.
111
112               NT-Response
113                   The >= 24 byte NT Response calculated from the user´s
114                   password and the supplied LANMAN Challenge. Typically, this
115                   is provided over the network by a client wishing to
116                   authenticate.
117
118               Password
119                   The user´s password. This would be provided by a network
120                   client, if the helper is being used in a legacy situation
121                   that exposes plaintext passwords in this way.
122
123               Request-User-Session-Key
124                   Apon sucessful authenticaiton, return the user session key
125                   associated with the login.
126
127               Request-LanMan-Session-Key
128                   Apon sucessful authenticaiton, return the LANMAN session
129                   key associated with the login.
130
131                   Warning
132                   Implementors should take care to base64 encode
133                             any data (such as usernames/passwords) that may
134                   contain malicous user data, such as           a newline.
135                   They may also need to decode strings from           the
136                   helper, which likewise may have been base64 encoded..sp .5v
137
138       --username=USERNAME
139           Specify username of user to authenticate
140
141       --domain=DOMAIN
142           Specify domain of user to authenticate
143
144       --workstation=WORKSTATION
145           Specify the workstation the user authenticated from
146
147       --challenge=STRING
148           NTLM challenge (in HEXADECIMAL)
149
150       --lm-response=RESPONSE
151           LM Response to the challenge (in HEXADECIMAL)
152
153       --nt-response=RESPONSE
154           NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
155
156       --password=PASSWORD
157           User´s plaintext password
158
159           If not specified on the command line, this is prompted for when
160           required.
161
162           For the NTLMSSP based server roles, this parameter specifies the
163           expected password, allowing testing without winbindd operational.
164
165       --request-lm-key
166           Retreive LM session key
167
168       --request-nt-key
169           Request NT key
170
171       --diagnostics
172           Perform Diagnostics on the authentication chain. Uses the password
173           from --password or prompts for one.
174
175       --require-membership-of={SID|Name}
176           Require that a user be a member of specified group (either name or
177           SID) for authentication to succeed.
178
179       -d|--debuglevel=level
180           level is an integer from 0 to 10. The default value if this
181           parameter is not specified is 0.
182
183           The higher this value, the more detail will be logged to the log
184           files about the activities of the server. At level 0, only critical
185           errors and serious warnings will be logged. Level 1 is a reasonable
186           level for day-to-day running - it generates a small amount of
187           information about operations carried out.
188
189           Levels above 1 will generate considerable amounts of log data, and
190           should only be used when investigating a problem. Levels above 3
191           are designed for use only by developers and generate HUGE amounts
192           of log data, most of which is extremely cryptic.
193
194           Note that specifying this parameter here will override the
195           smb.conf.5.html# parameter in the smb.conf file.
196
197       -V|--version
198           Prints the program version number.
199
200       -s|--configfile <configuration file>
201           The file specified contains the configuration details required by
202           the server. The information in this file includes server-specific
203           information such as what printcap file to use, as well as
204           descriptions of all the services that the server is to provide. See
205           smb.conf for more information. The default configuration file name
206           is determined at compile time.
207
208       -l|--log-basename=logdirectory
209           Base directory name for log/debug files. The extension ".progname"
210           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
211           file is never removed by the client.
212
213       -h|--help
214           Print a summary of command line options.
215

EXAMPLE SETUP

217       To setup ntlm_auth for use by squid 2.5, with both basic and NTLMSSP
218       authentication, the following should be placed in the squid.conf file.
219
220           auth_param ntlm program ntlm_auth --helper-protocol=squid-2.5-ntlmssp
221           auth_param basic program ntlm_auth --helper-protocol=squid-2.5-basic
222           auth_param basic children 5
223           auth_param basic realm Squid proxy-caching web server
224           auth_param basic credentialsttl 2 hours
225
226           Note
227           This example assumes that ntlm_auth has been installed into your
228           path, and that the group permissions on winbindd_privileged are as
229           described above.
230
231       To setup ntlm_auth for use by squid 2.5 with group limitation in
232       addition to the above example, the following should be added to the
233       squid.conf file.
234
235           auth_param ntlm program ntlm_auth --helper-protocol=squid-2.5-ntlmssp --require-membership-of=´WORKGROUP\Domain Users´
236           auth_param basic program ntlm_auth --helper-protocol=squid-2.5-basic --require-membership-of=´WORKGROUP\Domain Users´
237

TROUBLESHOOTING

239       If you´re experiencing problems with authenticating Internet Explorer
240       running under MS Windows 9X or Millenium Edition against ntlm_auth´s
241       NTLMSSP authentication helper (--helper-protocol=squid-2.5-ntlmssp),
242       then please read the Microsoft Knowledge Base article #239869 and
243       follow instructions described there.
244

VERSION

246       This man page is correct for version 3 of the Samba suite.
247

AUTHOR

249       The original Samba software and related utilities were created by
250       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
251       Source project similar to the way the Linux kernel is developed.
252
253       The ntlm_auth manpage was written by Jelmer Vernooij and Andrew
254       Bartlett.
255
256
257
258Samba 3.5                         08/02/2011                      NTLM_AUTH(1)
Impressum