Not able to mount samba cifs share with sec=ntlmv2 or sec=ntlmv2i parameter

Solution Verified - Updated -

Issue

  • Not able to mount samba cifs share with flag sec=ntlmv2 or sec=ntlmv2i parameter.
mount.cifs //192.168.2.2/data /mnt -o user=tuser,password=password,sec=ntlmv2i
  • Following error is observed in /var/log/messages logs.
Jun 27 12:22:42 samba-client kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jun 27 12:22:42 samba-client kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jun 27 12:22:55 samba-client kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
Jun 27 12:22:55 samba-client kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
Jun 27 12:22:55 samba-client kernel: CIFS VFS: Send error in SessSetup = -22
Jun 27 12:22:55 samba-client kernel: CIFS VFS: Send error in SessSetup = -22
Jun 27 12:22:55 samba-client kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jun 27 12:22:55 samba-client kernel: CIFS VFS: cifs_mount failed w/return code = -22
  • Following error is observed in /var/log/messages logs.
 Requested protocol [NT LM 0.12]
[2016/06/27 12:34:57.521367,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [POSIX 2]
[2016/06/27 12:34:57.521664,  3] smbd/negprot.c:401(reply_nt1)
  not using SPNEGO
[2016/06/27 12:34:57.521754,  3] smbd/negprot.c:704(reply_negprot)
  Selected protocol NT LM 0.12
[2016/06/27 12:34:57.522460,  3] smbd/process.c:1609(process_smb)
  Transaction 1 of length 286 (0 toread)
[2016/06/27 12:34:57.522567,  3] smbd/process.c:1414(switch_message)
  switch message SMBsesssetupX (pid 8827) conn 0x0
[2016/06/27 12:34:57.522670,  3] smbd/sesssetup.c:1347(reply_sesssetup_and_X)
  wct=13 flg2=0xd005
[2016/06/27 12:34:57.522772,  3] smbd/sesssetup.c:1550(reply_sesssetup_and_X)
  Domain=[EXAMPLE]  NativeOS=[Linux version 2.6.18-410.el5] NativeLanMan=[CIFS VFS Client for Linux] PrimaryDomain=[null]
[2016/06/27 12:34:57.522861,  3] smbd/sesssetup.c:1566(reply_sesssetup_and_X)
  sesssetupX:name=[EXAMPLE]\[tuser]@[10.254.62.145]
[2016/06/27 12:34:57.523009,  2] auth/auth_util.c:380(make_user_info_for_reply_enc)
  Rejecting raw NTLMv2 authentication with user [EXAMPLE\tuser]
[2016/06/27 12:34:57.523110,  3] smbd/error.c:81(error_packet_set)
  error packet at smbd/sesssetup.c(1678) cmd=115 (SMBsesssetupX) NT_STATUS_INVALID_PARAMETER
[2016/06/27 12:34:57.649694,  3] smbd/server_exit.c:181(exit_server_common)
  Server exit (failed to receive smb request)

Environment

  • Red Hat Enterprise Linux 6
  • samba-3.6.23-30.el6_7 and above.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.