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 authentication, 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 authentication, 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 malicious 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       --allow-mschapv2
229           Explicitly allow MSCHAPv2.
230
231       --offline-logon
232           Allow offline logons for plain text auth.
233
234       --configfile=<configuration file>
235           The file specified contains the configuration details required by
236           the server. The information in this file includes server-specific
237           information such as what printcap file to use, as well as
238           descriptions of all the services that the server is to provide. See
239           smb.conf for more information. The default configuration file name
240           is determined at compile time.
241
242       -V|--version
243           Prints the program version number.
244
245       -?|--help
246           Print a summary of command line options.
247
248       --usage
249           Display brief usage message.
250

EXAMPLE SETUP

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

TROUBLESHOOTING

274       If you're experiencing problems with authenticating Internet Explorer
275       running under MS Windows 9X or Millennium Edition against ntlm_auth's
276       NTLMSSP authentication helper (--helper-protocol=squid-2.5-ntlmssp),
277       then please read the Microsoft Knowledge Base article #239869 and
278       follow instructions described there.
279

VERSION

281       This man page is part of version 4.10.4 of the Samba suite.
282

AUTHOR

284       The original Samba software and related utilities were created by
285       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
286       Source project similar to the way the Linux kernel is developed.
287
288       The ntlm_auth manpage was written by Jelmer Vernooij and Andrew
289       Bartlett.
290
291
292
293Samba 4.10.4                      05/28/2019                      NTLM_AUTH(1)
Impressum