1NTLM_AUTH(1)                                                      NTLM_AUTH(1)
2
3
4

NAME

6       ntlm_auth - tool to allow external access to Winbind's NTLM authentica‐
7       tion 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 indended 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 win‐
26       bindd_privileged in $LOCKDIR. This should be  done  either  by  running
27       this  command  as root or providing group access to the winbindd_privi‐
28       leged directory. For security reasons, this  directory  should  not  be
29       world-accessable.
30

OPTIONS

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

EXAMPLE SETUP

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

TROUBLESHOOTING

280       If  you're  experiencing problems with authenticating Internet Explorer
281       running under MS Windows 9X or Millenium  Edition  against  ntlm_auth's
282       NTLMSSP  authentication  helper  (--helper-protocol=squid-2.5-ntlmssp),
283       then please read the Microsoft Knowledge Base article #239869 and  fol‐
284       low instructions described there.
285

VERSION

287       This man page is correct for version 3.0 of the Samba suite.
288

AUTHOR

290       The  original  Samba  software  and  related  utilities were created by
291       Andrew Tridgell. Samba is now developed by the Samba Team  as  an  Open
292       Source project similar to the way the Linux kernel is developed.
293
294       The  ntlm_auth  manpage  was  written  by  Jelmer  Vernooij  and Andrew
295       Bartlett.
296
297
298
299
300                                                                  NTLM_AUTH(1)
Impressum