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
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               Currently 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                   Examples:
95                       Username: bob
96
97                       Username:: Ym9i
98
99               NT-Domain
100                   The user´s domain, expected to be in Samba´s unix charset.
101
102                   Examples:
103                       NT-Domain: WORKGROUP
104
105                       NT-Domain:: V09SS0dST1VQ
106
107               Full-Username
108                   The fully qualified username, expected to be in Samba´s
109                   unix charset and qualified with the winbind separator.
110
111                   Examples:
112                       Full-Username: WORKGROUP\bob
113
114                       Full-Username:: V09SS0dST1VQYm9i
115
116               LANMAN-Challenge
117                   The 8 byte LANMAN Challenge value, generated randomly by
118                   the server, or (in cases such as MSCHAPv2) generated in
119                   some way by both the server and the client.
120
121                   Examples:
122                       LANMAN-Challenge: 0102030405060708
123
124               LANMAN-Response
125                   The 24 byte LANMAN Response value, calculated from the
126                   user´s password and the supplied LANMAN Challenge.
127                   Typically, this is provided over the network by a client
128                   wishing to authenticate.
129
130                   Examples:
131                       LANMAN-Response:
132                       0102030405060708090A0B0C0D0E0F101112131415161718
133
134               NT-Response
135                   The >= 24 byte NT Response calculated from the user´s
136                   password and the supplied LANMAN Challenge. Typically, this
137                   is provided over the network by a client wishing to
138                   authenticate.
139
140                   Examples:
141                       NT-Response:
142                       0102030405060708090A0B0C0D0E0F10111213141516171
143
144               Password
145                   The user´s password. This would be provided by a network
146                   client, if the helper is being used in a legacy situation
147                   that exposes plaintext passwords in this way.
148
149                   Examples:
150                       Password: samba2
151
152                       Password:: c2FtYmEy
153
154               Request-User-Session-Key
155                   Upon successful authenticaiton, return the user session key
156                   associated with the login.
157
158                   Examples:
159                       Request-User-Session-Key: Yes
160
161               Request-LanMan-Session-Key
162                   Upon successful authenticaiton, return the LANMAN session
163                   key associated with the login.
164
165                   Examples:
166                       Request-LanMan-Session-Key: Yes
167
168
169               Warning
170               Implementers should take care to base64 encode any data (such
171               as usernames/passwords) that may contain malicous user data,
172               such as a newline. They may also need to decode strings from
173               the helper, which likewise may have been base64 encoded.
174
175       --username=USERNAME
176           Specify username of user to authenticate
177
178       --domain=DOMAIN
179           Specify domain of user to authenticate
180
181       --workstation=WORKSTATION
182           Specify the workstation the user authenticated from
183
184       --challenge=STRING
185           NTLM challenge (in HEXADECIMAL)
186
187       --lm-response=RESPONSE
188           LM Response to the challenge (in HEXADECIMAL)
189
190       --nt-response=RESPONSE
191           NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
192
193       --password=PASSWORD
194           User´s plaintext password
195
196           If not specified on the command line, this is prompted for when
197           required.
198
199           For the NTLMSSP based server roles, this parameter specifies the
200           expected password, allowing testing without winbindd operational.
201
202       --request-lm-key
203           Retrieve LM session key
204
205       --request-nt-key
206           Request NT key
207
208       --diagnostics
209           Perform Diagnostics on the authentication chain. Uses the password
210           from --password or prompts for one.
211
212       --require-membership-of={SID|Name}
213           Require that a user be a member of specified group (either name or
214           SID) for authentication to succeed.
215
216       --pam-winbind-conf=FILENAME
217           Define the path to the pam_winbind.conf file.
218
219       --target-hostname=HOSTNAME
220           Define the target hostname.
221
222       --target-service=SERVICE
223           Define the target service.
224
225       --use-cached-creds
226           Whether to use credentials cached by winbindd.
227
228       --configfile=<configuration file>
229           The file specified contains the configuration details required by
230           the server. The information in this file includes server-specific
231           information such as what printcap file to use, as well as
232           descriptions of all the services that the server is to provide. See
233           smb.conf for more information. The default configuration file name
234           is determined at compile time.
235
236       -V|--version
237           Prints the program version number.
238
239       -?|--help
240           Print a summary of command line options.
241
242       --usage
243           Display brief usage message.
244

EXAMPLE SETUP

246       To setup ntlm_auth for use by squid 2.5, with both basic and NTLMSSP
247       authentication, the following should be placed in the squid.conf file.
248
249           auth_param ntlm program ntlm_auth --helper-protocol=squid-2.5-ntlmssp
250           auth_param basic program ntlm_auth --helper-protocol=squid-2.5-basic
251           auth_param basic children 5
252           auth_param basic realm Squid proxy-caching web server
253           auth_param basic credentialsttl 2 hours
254
255           Note
256           This example assumes that ntlm_auth has been installed into your
257           path, and that the group permissions on winbindd_privileged are as
258           described above.
259
260       To setup ntlm_auth for use by squid 2.5 with group limitation in
261       addition to the above example, the following should be added to the
262       squid.conf file.
263
264           auth_param ntlm program ntlm_auth --helper-protocol=squid-2.5-ntlmssp --require-membership-of=´WORKGROUP\Domain Users´
265           auth_param basic program ntlm_auth --helper-protocol=squid-2.5-basic --require-membership-of=´WORKGROUP\Domain Users´
266

TROUBLESHOOTING

268       If you´re experiencing problems with authenticating Internet Explorer
269       running under MS Windows 9X or Millennium Edition against ntlm_auth´s
270       NTLMSSP authentication helper (--helper-protocol=squid-2.5-ntlmssp),
271       then please read the Microsoft Knowledge Base article #239869 and
272       follow instructions described there.
273

VERSION

275       This man page is correct for version 3 of the Samba suite.
276

AUTHOR

278       The original Samba software and related utilities were created by
279       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
280       Source project similar to the way the Linux kernel is developed.
281
282       The ntlm_auth manpage was written by Jelmer Vernooij and Andrew
283       Bartlett.
284
285
286
287Samba 4.2                         06/19/2018                      NTLM_AUTH(1)
Impressum