Discussion:
connecting to windows server with SMB2
Ashish Sangwan
2014-07-10 10:26:46 UTC
Permalink
I am using kernel version 3.8.13 and windows 7.

The below command works successfully:
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm

Other than 1.0, all are fail:
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13

Tried with sec=ntlmv2/none/la
Pavel Shilovsky
2014-07-10 10:56:40 UTC
Permalink
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Did you tries without "sec=" option at all?

If yes, you should set "echo 1 > /proc/fs/cifs/cifsFYI', try to mount
and collect dmesg output and send it to the list.
--
Best regards,
Pavel Shilovsky.
Ashish Sangwan
2014-07-10 11:20:49 UTC
Permalink
Post by Pavel Shilovsky
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Did you tries without "sec=" option at all?
Yes, without sec=ntlm option, I am not able to mount even with vers=1.0
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0
[ 0][ 1082.672000] selected vers 1.0
[ 0][ 1082.680000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.688000] CIFS VFS: Send error in SessSetup = -13
mount: mounting //107.109.224.147/sharefolder on /mnt failed: Permission denied
Post by Pavel Shilovsky
If yes, you should set "echo 1 > /proc/fs/cifs/cifsFYI', try to mount
and collect dmesg output and send it to the list.
Here it is for the command:
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0

[ 0][ 1082.844000] fs/cifs/netmisc.c: address conversion returned 1 for 107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Username: a.sangwan
[ 0][ 1082.844000] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[ 0][ 1082.844000] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 50 with uid: 0
[ 0][ 1082.844000] fs/cifs/connect.c: UNC: \\107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Socket created
[ 0][ 1082.844000] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[ 0][ 1082.848000] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xe5b36c00/0xe5b7f230)
[ 0][ 1082.848000] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 51 with uid: 0
[ 0][ 1082.848000] fs/cifs/connect.c: Existing smb sess not found
[ 0][ 1082.848000] fs/cifs/cifssmb.c: secFlags 0x81
[ 0][ 1082.848000] fs/cifs/cifssmb.c: NTLMSSP only mechanism, enable extended security
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 114
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=69
[ 0][ 1082.848000] fs/cifs/connect.c: Demultiplex PID: 222
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x7f
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Dialect: 2
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Max buf = 4356
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/cifssmb.c: negprot rc 0
[ 0][ 1082.848000] fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x8001e3fc TimeAdjust: -19800
[ 0][ 1082.848000] fs/cifs/sess.c: sess setup type 3
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 1
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=186
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x161
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4
[ 0][ 1082.848000] fs/cifs/netmisc.c: Mapping smb error code 0xc0000016 to POSIX err -5
[ 0][ 1082.848000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.848000] fs/cifs/sess.c: UID = 2048
[ 0][ 1082.848000] fs/cifs/sess.c: bleft 131
[ 0][ 1082.848000] fs/cifs/sess.c: serverOS=Windows 7 Enterprise 7601 Service Pack 1
[ 0][ 1082.848000] fs/cifs/sess.c: serverNOS=Windows 7 Enterprise 6.1
[ 0][ 1082.848000] fs/cifs/sess.c: ssetup freeing small buf e5bc1c00
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 3
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=420
[ 0][ 1082.852000] fs/cifs/connect.c: RFC1002 header 0x23
[ 0][ 1082.852000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=3 state=4
[ 0][ 1082.852000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.856000] fs/cifs/netmisc.c: Mapping smb error code 0xc000006d to POSIX err -13
[ 0][ 1082.856000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.856000] fs/cifs/sess.c: ssetup freeing small buf e5bc1500
[ 0][ 1082.856000] CIFS VFS: Send error in SessSetup = -13
[ 0][ 1082.860000] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 51) rc = -13
[ 0][ 1082.860000] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xe5b36c00/0xe5b7f230)

In other mail Benjamin has suggessted to additionally provide -o "domain="
I am wondering why SMB1.0 is success as I don't provide domain in that cas too.
Anyway, I will try suggesstion.

Additionally, I am able to connect to samba server (v 4.0.2) from the same machine
without giving any -o sec -o domain option and it is success for all 2.0, 2.1 and 3.0 versions.

Regards,
Ashish
--
Best regards,
Pavel
Pavel Shilovsky
2014-07-10 11:51:36 UTC
Permalink
Post by Ashish Sangwan
Post by Pavel Shilovsky
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Did you tries without "sec=" option at all?
Yes, without sec=ntlm option, I am not able to mount even with vers=1.0
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0
[ 0][ 1082.672000] selected vers 1.0
[ 0][ 1082.680000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.688000] CIFS VFS: Send error in SessSetup = -13
mount: mounting //107.109.224.147/sharefolder on /mnt failed: Permission denied
Post by Pavel Shilovsky
If yes, you should set "echo 1 > /proc/fs/cifs/cifsFYI', try to mount
and collect dmesg output and send it to the list.
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0
[ 0][ 1082.844000] fs/cifs/netmisc.c: address conversion returned 1 for 107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Username: a.sangwan
[ 0][ 1082.844000] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[ 0][ 1082.844000] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 50 with uid: 0
[ 0][ 1082.844000] fs/cifs/connect.c: UNC: \\107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Socket created
[ 0][ 1082.844000] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[ 0][ 1082.848000] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xe5b36c00/0xe5b7f230)
[ 0][ 1082.848000] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 51 with uid: 0
[ 0][ 1082.848000] fs/cifs/connect.c: Existing smb sess not found
[ 0][ 1082.848000] fs/cifs/cifssmb.c: secFlags 0x81
[ 0][ 1082.848000] fs/cifs/cifssmb.c: NTLMSSP only mechanism, enable extended security
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 114
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=69
[ 0][ 1082.848000] fs/cifs/connect.c: Demultiplex PID: 222
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x7f
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Dialect: 2
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Max buf = 4356
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/cifssmb.c: negprot rc 0
[ 0][ 1082.848000] fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x8001e3fc TimeAdjust: -19800
[ 0][ 1082.848000] fs/cifs/sess.c: sess setup type 3
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 1
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=186
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x161
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4
[ 0][ 1082.848000] fs/cifs/netmisc.c: Mapping smb error code 0xc0000016 to POSIX err -5
[ 0][ 1082.848000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.848000] fs/cifs/sess.c: UID = 2048
[ 0][ 1082.848000] fs/cifs/sess.c: bleft 131
[ 0][ 1082.848000] fs/cifs/sess.c: serverOS=Windows 7 Enterprise 7601 Service Pack 1
[ 0][ 1082.848000] fs/cifs/sess.c: serverNOS=Windows 7 Enterprise 6.1
[ 0][ 1082.848000] fs/cifs/sess.c: ssetup freeing small buf e5bc1c00
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 3
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=420
[ 0][ 1082.852000] fs/cifs/connect.c: RFC1002 header 0x23
[ 0][ 1082.852000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=3 state=4
[ 0][ 1082.852000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.856000] fs/cifs/netmisc.c: Mapping smb error code 0xc000006d to POSIX err -13
[ 0][ 1082.856000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.856000] fs/cifs/sess.c: ssetup freeing small buf e5bc1500
[ 0][ 1082.856000] CIFS VFS: Send error in SessSetup = -13
[ 0][ 1082.860000] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 51) rc = -13
[ 0][ 1082.860000] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xe5b36c00/0xe5b7f230)
In other mail Benjamin has suggessted to additionally provide -o "domain="
I am wondering why SMB1.0 is success as I don't provide domain in that cas too.
Anyway, I will try suggesstion.
Additionally, I am able to connect to samba server (v 4.0.2) from the same machine
without giving any -o sec -o domain option and it is success for all 2.0, 2.1 and 3.0 versions.
Sorry for being unclear, I meant dmesg output of unsuccessful mount
with vers=2.0.
--
Best regards,
Pavel Shilovsky.
Ashish Sangwan
2014-07-10 12:10:15 UTC
Permalink
Sorry for top posting.

It seems cifs client tries to connect 2 times.
dmesg output:
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0
[ 2][ 3966.260000] fs/cifs/cifsfs.c: Devname: //107.109.224.147/sharefolder flags: 32768
[ 2][ 3966.260000] fs/cifs/netmisc.c: address conversion returned 1 for 107.109.224.147\sharefolder
[ 2][ 3966.260000] fs/cifs/connect.c: Username: a.sangwan
[ 2][ 3966.260000] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[ 2][ 3966.260000] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 68 with uid: 0
[ 2][ 3966.260000] fs/cifs/connect.c: UNC: \\107.109.224.147\sharefolder
[ 2][ 3966.260000] fs/cifs/connect.c: Socket created
[ 2][ 3966.260000] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[ 0][ 3966.264000] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xe5ab9800/0xe5b7f230)
[ 0][ 3966.264000] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 69 with uid: 0
[ 0][ 3966.264000] fs/cifs/connect.c: Existing smb sess not found
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: Negotiate protocol
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.264000] fs/cifs/transport.c: Sending smb: smb_len=102
[ 0][ 3966.264000] fs/cifs/connect.c: Demultiplex PID: 243
[ 0][ 3966.264000] fs/cifs/connect.c: RFC1002 header 0xaa
[ 0][ 3966.264000] fs/cifs/smb2misc.c: smb2_check_message length: 0xae, smb_buf_length: 0xaa
[ 0][ 3966.264000] fs/cifs/smb2misc.c: SMB2 data length 42 offset 128
[ 0][ 3966.264000] fs/cifs/smb2misc.c: SMB2 len 174
[ 0][ 3966.264000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=0 mid=0 state=4
[ 0][ 3966.264000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: mode 0x1
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: negotiated smb2.0 dialect
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: Signing optional
[ 0][ 3966.264000] fs/cifs/connect.c: Security Mode: 0x1 Capabilities: 0x300001 TimeAdjust: 0
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: Session Setup
[ 0][ 3966.264000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.264000] fs/cifs/transport.c: Sending smb: smb_len=120
[ 0][ 3966.268000] fs/cifs/connect.c: RFC1002 header 0xfa
[ 0][ 3966.268000] fs/cifs/smb2misc.c: smb2_check_message length: 0xfe, smb_buf_length: 0xfa
[ 0][ 3966.268000] fs/cifs/smb2misc.c: SMB2 data length 178 offset 72
[ 0][ 3966.268000] fs/cifs/smb2misc.c: SMB2 len 254
[ 0][ 3966.268000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=1 state=4
[ 0][ 3966.268000] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741802 to POSIX err -5
[ 0][ 3966.268000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.268000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.268000] fs/cifs/transport.c: Sending smb: smb_len=354
[ 0][ 3966.268000] fs/cifs/connect.c: RFC1002 header 0x49
[ 0][ 3966.268000] fs/cifs/smb2misc.c: smb2_check_message length: 0x4d, smb_buf_length: 0x49
[ 0][ 3966.268000] fs/cifs/smb2misc.c: SMB2 data length 0 offset 0
[ 0][ 3966.268000] fs/cifs/smb2misc.c: SMB2 len 77
[ 0][ 3966.268000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=2 state=4
[ 0][ 3966.268000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 3966.272000] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741715 to POSIX err -13
[ 0][ 3966.272000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.272000] CIFS VFS: Send error in SessSetup = -13
[ 0][ 3966.280000] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 69) rc = -13
[ 0][ 3966.280000] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xe5ab9800/0xe5b7f230)
[ 3][ 3966.428000] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 68) rc = -13
[ 3][ 3966.428000] fs/cifs/cifsfs.c: Devname: //107.109.224.147/sharefolder flags: 32769
[ 3][ 3966.432000] fs/cifs/netmisc.c: address conversion returned 1 for 107.109.224.147\sharefolder
[ 3][ 3966.432000] fs/cifs/connect.c: Username: a.sangwan
[ 3][ 3966.432000] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[ 3][ 3966.432000] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 70 with uid: 0
[ 3][ 3966.432000] fs/cifs/connect.c: UNC: \\107.109.224.147\sharefolder
[ 3][ 3966.432000] fs/cifs/connect.c: Socket created
[ 3][ 3966.432000] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[ 0][ 3966.432000] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xe4c53400/0xe5b7f230)
[ 0][ 3966.432000] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 71 with uid: 0
[ 0][ 3966.432000] fs/cifs/connect.c: Existing smb sess not found
[ 0][ 3966.432000] fs/cifs/smb2pdu.c: Negotiate protocol
[ 0][ 3966.432000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.432000] fs/cifs/transport.c: Sending smb: smb_len=102
[ 0][ 3966.432000] fs/cifs/connect.c: Demultiplex PID: 244
[ 0][ 3966.436000] fs/cifs/connect.c: RFC1002 header 0xaa
[ 0][ 3966.436000] fs/cifs/smb2misc.c: smb2_check_message length: 0xae, smb_buf_length: 0xaa
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 data length 42 offset 128
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 len 174
[ 0][ 3966.436000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=0 mid=0 state=4
[ 0][ 3966.436000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: mode 0x1
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: negotiated smb2.0 dialect
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: Signing optional
[ 0][ 3966.436000] fs/cifs/connect.c: Security Mode: 0x1 Capabilities: 0x300001 TimeAdjust: 0
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: Session Setup
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.436000] fs/cifs/transport.c: Sending smb: smb_len=120
[ 0][ 3966.436000] fs/cifs/connect.c: RFC1002 header 0xfa
[ 0][ 3966.436000] fs/cifs/smb2misc.c: smb2_check_message length: 0xfe, smb_buf_length: 0xfa
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 data length 178 offset 72
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 len 254
[ 0][ 3966.436000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=1 state=4
[ 0][ 3966.436000] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741802 to POSIX err -5
[ 0][ 3966.436000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.436000] fs/cifs/smb2pdu.c: sec_flags 0x81
[ 0][ 3966.436000] fs/cifs/transport.c: Sending smb: smb_len=354
[ 0][ 3966.436000] fs/cifs/connect.c: RFC1002 header 0x49
[ 0][ 3966.436000] fs/cifs/smb2misc.c: smb2_check_message length: 0x4d, smb_buf_length: 0x49
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 data length 0 offset 0
[ 0][ 3966.436000] fs/cifs/smb2misc.c: SMB2 len 77
[ 0][ 3966.436000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=2 state=4
[ 0][ 3966.436000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 3966.444000] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741715 to POSIX err -13
[ 0][ 3966.444000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 3966.444000] CIFS VFS: Send error in SessSetup = -13
[ 0][ 3966.448000] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 71) rc = -13
[ 0][ 3966.448000] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xe4c53400/0xe5b7f230)
[ 3][ 3966.600000] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 70) rc = -13

Regards,
Ashish
------- Original Message -------
Sender : Pavel Shilovsky<***@gmail.com>
Date : Jul 10, 2014 17:21 (GMT+05:30)
Title : Re: Re: connecting to windows server with SMB2
Post by Ashish Sangwan
Post by Pavel Shilovsky
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Did you tries without "sec=" option at all?
Yes, without sec=ntlm option, I am not able to mount even with vers=1.0
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0
[ 0][ 1082.672000] selected vers 1.0
[ 0][ 1082.680000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.688000] CIFS VFS: Send error in SessSetup = -13
mount: mounting //107.109.224.147/sharefolder on /mnt failed: Permission denied
Post by Pavel Shilovsky
If yes, you should set "echo 1 > /proc/fs/cifs/cifsFYI', try to mount
and collect dmesg output and send it to the list.
VDLinux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0
[ 0][ 1082.844000] fs/cifs/netmisc.c: address conversion returned 1 for 107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Username: a.sangwan
[ 0][ 1082.844000] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[ 0][ 1082.844000] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 50 with uid: 0
[ 0][ 1082.844000] fs/cifs/connect.c: UNC: \\107.109.224.147\sharefolder
[ 0][ 1082.844000] fs/cifs/connect.c: Socket created
[ 0][ 1082.844000] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[ 0][ 1082.848000] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xe5b36c00/0xe5b7f230)
[ 0][ 1082.848000] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 51 with uid: 0
[ 0][ 1082.848000] fs/cifs/connect.c: Existing smb sess not found
[ 0][ 1082.848000] fs/cifs/cifssmb.c: secFlags 0x81
[ 0][ 1082.848000] fs/cifs/cifssmb.c: NTLMSSP only mechanism, enable extended security
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 114
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=69
[ 0][ 1082.848000] fs/cifs/connect.c: Demultiplex PID: 222
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x7f
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Dialect: 2
[ 0][ 1082.848000] fs/cifs/cifssmb.c: Max buf = 4356
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 0][ 1082.848000] fs/cifs/cifssmb.c: negprot rc 0
[ 0][ 1082.848000] fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x8001e3fc TimeAdjust: -19800
[ 0][ 1082.848000] fs/cifs/sess.c: sess setup type 3
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 1
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=186
[ 0][ 1082.848000] fs/cifs/connect.c: RFC1002 header 0x161
[ 0][ 1082.848000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4
[ 0][ 1082.848000] fs/cifs/netmisc.c: Mapping smb error code 0xc0000016 to POSIX err -5
[ 0][ 1082.848000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.848000] fs/cifs/sess.c: UID = 2048
[ 0][ 1082.848000] fs/cifs/sess.c: bleft 131
[ 0][ 1082.848000] fs/cifs/sess.c: serverOS=Windows 7 Enterprise 7601 Service Pack 1
[ 0][ 1082.848000] fs/cifs/sess.c: serverNOS=Windows 7 Enterprise 6.1
[ 0][ 1082.848000] fs/cifs/sess.c: ssetup freeing small buf e5bc1c00
[ 0][ 1082.848000] fs/cifs/sess.c: ntlmssp session setup phase 3
[ 0][ 1082.848000] fs/cifs/transport.c: For smb_command 115
[ 0][ 1082.848000] fs/cifs/transport.c: Sending smb: smb_len=420
[ 0][ 1082.852000] fs/cifs/connect.c: RFC1002 header 0x23
[ 0][ 1082.852000] fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=3 state=4
[ 0][ 1082.852000] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[ 0][ 1082.856000] fs/cifs/netmisc.c: Mapping smb error code 0xc000006d to POSIX err -13
[ 0][ 1082.856000] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 0][ 1082.856000] fs/cifs/sess.c: ssetup freeing small buf e5bc1500
[ 0][ 1082.856000] CIFS VFS: Send error in SessSetup = -13
[ 0][ 1082.860000] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 51) rc = -13
[ 0][ 1082.860000] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xe5b36c00/0xe5b7f230)
In other mail Benjamin has suggessted to additionally provide -o "domain="
I am wondering why SMB1.0 is success as I don't provide domain in that cas too.
Anyway, I will try suggesstion.
Additionally, I am able to connect to samba server (v 4.0.2) from the same machine
without giving any -o sec -o domain option and it is success for all 2.0, 2.1 and 3.0 versions.
Sorry for being unclear, I meant dmesg output of unsuccessful mount
with vers=2.0.

-
Ashish Sangwan
2014-07-10 12:52:08 UTC
Permalink
Hello,
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm -o domain=DOMAINNAME
Tried, does'nt help :(
Exactly same error code: STATUS_LOGON_FAILURE

Regards,
As
Shirish Pargaonkar
2014-07-10 13:58:30 UTC
Permalink
In order to sec=ntlmv2 succeed, you will need this patch on the Windows 7 box.
http://support.microsoft.com/kb/957441/en-us

For smb2 (vers=2.0), sec=ntlmssp (which is the default) should succeed against
a Windows 7 box.

Would it be possible to attach a wireshark trace of the exchange?
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Ashish Sangwan
2014-07-11 05:17:39 UTC
Permalink
Post by Shirish Pargaonkar
In order to sec=ntlmv2 succeed, you will need this patch on the Windows 7 box.
http://support.microsoft.com/kb/957441/en-us
Ok
Post by Shirish Pargaonkar
For smb2 (vers=2.0), sec=ntlmssp (which is the default) should succeed against
a Windows 7 box.
True, I tried without -o sec option and it uses ntlmssp.
Post by Shirish Pargaonkar
Would it be possible to attach a wireshark trace of the exchange?
sure, below is the packet capture without any -o sec option:
mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0

No. Time Source Destination Protocol Length Info
9 0.005133000 107.109.224.147 107.109.224.197 SMB2 240 Negotiate Protocol Response
Frame 9: 240 bytes on wire (1920 bits), 240 bytes captured (1920 bits) on interface 0
Ethernet II, Src: SamsungE_65:a9:b8 (e8:03:9a:65:a9:b8), Dst: SMC_75:04:25 (00:80:0f:75:04:25)
Internet Protocol Version 4, Src: 107.109.224.147 (107.109.224.147), Dst: 107.109.224.197 (107.109.224.197)
Transmission Control Protocol, Src Port: microsoft-ds (445), Dst Port: 51900 (51900), Seq: 1, Ack: 107, Len: 174
NetBIOS Session Service
SMB2 (Server Message Block Protocol version 2)
SMB2 Header
Server Component: SMB2
Header Length: 64
Credit Charge: 0
NT Status: STATUS_SUCCESS (0x00000000)
Command: Negotiate Protocol (0)
Credits granted: 1
Flags: 0x00000001
..0. .... .... .... .... .... .... .... = Replay operation: This is NOT a replay operation
...0 .... .... .... .... .... .... .... = DFS operation: This is a normal operation
.... .... .... .... .... .... .... 0... = Signing: This pdu is NOT signed
.... .... .... .... .... .... .... .0.. = Chained: This pdu is NOT a chained command
.... .... .... .... .... .... .... ..0. = Async command: This is a SYNC command
.... .... .... .... .... .... .... ...1 = Response: This is a RESPONSE
Chain Offset: 0x00000000
Command Sequence Number: 0
Process Id: 000000d1
Tree Id: 0x00000000
Session Id: 0x0000000000000000
Signature: 00000000000000000000000000000000
[Response to: 8]
[Time from request: 0.000697000 seconds]
Negotiate Protocol Response (0x00)
StructureSize: 0x0041
Security mode: 0x01
.... ..0. = Signing required: False
.... ...1 = Signing enabled: True
Dialect: 0x0202
Server Guid: 1fdf9cc6-8cb9-4d2d-b517-903f142c0440
Capabilities: 0x00000001
.... .... .... .... .... .... .... ...1 = DFS: This host supports DFS
.... .... .... .... .... .... .... ..0. = LEASING: This host does NOT support LEASING
.... .... .... .... .... .... .... .0.. = LARGE MTU: This host does NOT support LARGE_MTU
.... .... .... .... .... .... .... 0... = MULTI CHANNEL: This host does NOT support MULTI CHANNEL
.... .... .... .... .... .... ...0 .... = PERSISTENT HANDLES: This host does NOT support PERSISTENT HANDLES
.... .... .... .... .... .... ..0. .... = DIRECTORY LEASING: This host does NOT support DIRECTORY LEASING
.... .... .... .... .... .... .0.. .... = ENCRYPTION: This host does NOT support ENCRYPTION
Max Transaction Size: 65536
Max Read Size: 65536
Max Write Size: 65536
Current Time: Jul 11, 2014 10:28:32.408713900 India Standard Time
Boot Time: Jul 10, 2014 14:17:39.481258000 India Standard Time
Security Blob: 602806062b0601050502a01e301ca01a3018060a2b060104...
Offset: 0x00000080
Length: 42
GSS-API Generic Security Service Application Program Interface
OID: 1.3.6.1.5.5.2 (SPNEGO - Simple Protected Negotiation)
Simple Protected Negotiation
negTokenInit
mechTypes: 2 items
MechType: 1.3.6.1.4.1.311.2.2.30 (NEGOEX - SPNEGO Extended Negotiation Security Mechanism)
MechType: 1.3.6.1.4.1.311.2.2.10 (NTLMSSP - Microsoft NTLM Security Support Provider)

No. Time Source Destination Protocol Length Info
13 0.007637000 107.109.224.197 107.109.224.147 SMB2 424 Session Setup Request, NTLMSSP_AUTH, User: ASHISH-PC\a.sangwan
Frame 13: 424 bytes on wire (3392 bits), 424 bytes captured (3392 bits) on interface 0
Ethernet II, Src: SMC_75:04:25 (00:80:0f:75:04:25), Dst: SamsungE_65:a9:b8 (e8:03:9a:65:a9:b8)
Internet Protocol Version 4, Src: 107.109.224.197 (107.109.224.197), Dst: 107.109.224.147 (107.109.224.147)
Transmission Control Protocol, Src Port: 51900 (51900), Dst Port: microsoft-ds (445), Seq: 231, Ack: 429, Len: 358
NetBIOS Session Service
SMB2 (Server Message Block Protocol version 2)
SMB2 Header
Server Component: SMB2
Header Length: 64
Credit Charge: 0
Channel Sequence: 0
Reserved: 0000
Command: Session Setup (1)
Credits requested: 3
Flags: 0x00000000
..0. .... .... .... .... .... .... .... = Replay operation: This is NOT a replay operation
...0 .... .... .... .... .... .... .... = DFS operation: This is a normal operation
.... .... .... .... .... .... .... 0... = Signing: This pdu is NOT signed
.... .... .... .... .... .... .... .0.. = Chained: This pdu is NOT a chained command
.... .... .... .... .... .... .... ..0. = Async command: This is a SYNC command
.... .... .... .... .... .... .... ...0 = Response: This is a REQUEST
Chain Offset: 0x00000000
Command Sequence Number: 2
Process Id: 000000d1
Tree Id: 0x00000000
Session Id: 0x0000040004000035 Acct:a.sangwan Domain:ASHISH-PC Host:
Signature: 00000000000000000000000000000000
[Response in: 14]
Session Setup Request (0x01)
StructureSize: 0x0019
0000 0000 0001 100. = Fixed Part Length: 24
.... .... .... ...1 = Dynamic Part: True
Flags: 0
Security mode: 0x01
.... ..0. = Signing required: False
.... ...1 = Signing enabled: True
Capabilities: 0x00000000
.... .... .... .... .... .... .... ...0 = DFS: This host does NOT support DFS
.... .... .... .... .... .... .... ..0. = LEASING: This host does NOT support LEASING
.... .... .... .... .... .... .... .0.. = LARGE MTU: This host does NOT support LARGE_MTU
.... .... .... .... .... .... .... 0... = MULTI CHANNEL: This host does NOT support MULTI CHANNEL
.... .... .... .... .... .... ...0 .... = PERSISTENT HANDLES: This host does NOT support PERSISTENT HANDLES
.... .... .... .... .... .... ..0. .... = DIRECTORY LEASING: This host does NOT support DIRECTORY LEASING
.... .... .... .... .... .... .0.. .... = ENCRYPTION: This host does NOT support ENCRYPTION
Channel: 0
Previous Session Id: 0x0000000000000000
Security Blob: 4e544c4d5353500003000000000000004000000094009400...
Offset: 0x00000058
Length: 266
NTLM Secure Service Provider
NTLMSSP identifier: NTLMSSP
NTLM Message Type: NTLMSSP_AUTH (0x00000003)
Lan Manager Response: Empty
NTLM Response: 24b41137ea2f959cba4ece78a831781d0101000000000000...
NTLM Client Challenge: d92e2720ce844f24
Domain name: ASHISH-PC
User name: a.sangwan
Host name: NULL
Session Key: 38df3a4d60cc9e32ea0f18a824f69c55
Flags: 0xa0880205
1... .... .... .... .... .... .... .... = Negotiate 56: Set
.0.. .... .... .... .... .... .... .... = Negotiate Key Exchange: Not set
..1. .... .... .... .... .... .... .... = Negotiate 128: Set
...0 .... .... .... .... .... .... .... = Negotiate 0x10000000: Not set
.... 0... .... .... .... .... .... .... = Negotiate 0x08000000: Not set
.... .0.. .... .... .... .... .... .... = Negotiate 0x04000000: Not set
.... ..0. .... .... .... .... .... .... = Negotiate Version: Not set
.... ...0 .... .... .... .... .... .... = Negotiate 0x01000000: Not set
.... .... 1... .... .... .... .... .... = Negotiate Target Info: Set
.... .... .0.. .... .... .... .... .... = Request Non-NT Session: Not set
.... .... ..0. .... .... .... .... .... = Negotiate 0x00200000: Not set
.... .... ...0 .... .... .... .... .... = Negotiate Identify: Not set
.... .... .... 1... .... .... .... .... = Negotiate Extended Security: Set
.... .... .... .0.. .... .... .... .... = Target Type Share: Not set
.... .... .... ..0. .... .... .... .... = Target Type Server: Not set
.... .... .... ...0 .... .... .... .... = Target Type Domain: Not set
.... .... .... .... 0... .... .... .... = Negotiate Always Sign: Not set
.... .... .... .... .0.. .... .... .... = Negotiate 0x00004000: Not set
.... .... .... .... ..0. .... .... .... = Negotiate OEM Workstation Supplied: Not set
.... .... .... .... ...0 .... .... .... = Negotiate OEM Domain Supplied: Not set
.... .... .... .... .... 0... .... .... = Negotiate 0x00000800: Not set
.... .... .... .... .... .0.. .... .... = Negotiate NT Only: Not set
.... .... .... .... .... ..1. .... .... = Negotiate NTLM key: Set
.... .... .... .... .... ...0 .... .... = Negotiate 0x00000100: Not set
.... .... .... .... .... .... 0... .... = Negotiate Lan Manager Key: Not set
.... .... .... .... .... .... .0.. .... = Negotiate Datagram: Not set
.... .... .... .... .... .... ..0. .... = Negotiate Seal: Not set
.... .... .... .... .... .... ...0 .... = Negotiate Sign: Not set
.... .... .... .... .... .... .... 0... = Request 0x00000008: Not set
.... .... .... .... .... .... .... .1.. = Request Target: Set
.... .... .... .... .... .... .... ..0. = Negotiate OEM: Not set
.... .... .... .... .... .... .... ...1 = Negotiate UNICODE: Set

No. Time Source Destination Protocol Length Info
14 0.008399000 107.109.224.147 107.109.224.197 SMB2 143 Session Setup Response, Error: STATUS_LOGON_FAILURE
Frame 14: 143 bytes on wire (1144 bits), 143 bytes captured (1144 bits) on interface 0
Ethernet II, Src: SamsungE_65:a9:b8 (e8:03:9a:65:a9:b8), Dst: SMC_75:04:25 (00:80:0f:75:04:25)
Internet Protocol Version 4, Src: 107.109.224.147 (107.109.224.147), Dst: 107.109.224.197 (107.109.224.197)
Transmission Control Protocol, Src Port: microsoft-ds (445), Dst Port: 51900 (51900), Seq: 429, Ack: 589, Len: 77
NetBIOS Session Service
SMB2 (Server Message Block Protocol version 2)
SMB2 Header
Server Component: SMB2
Header Length: 64
Credit Charge: 0
NT Status: STATUS_LOGON_FAILURE (0xc000006d)
Command: Session Setup (1)
Credits granted: 1
Flags: 0x00000001
..0. .... .... .... .... .... .... .... = Replay operation: This is NOT a replay operation
...0 .... .... .... .... .... .... .... = DFS operation: This is a normal operation
.... .... .... .... .... .... .... 0... = Signing: This pdu is NOT signed
.... .... .... .... .... .... .... .0.. = Chained: This pdu is NOT a chained command
.... .... .... .... .... .... .... ..0. = Async command: This is a SYNC command
.... .... .... .... .... .... .... ...1 = Response: This is a RESPONSE
Chain Offset: 0x00000000
Command Sequence Number: 2
Process Id: 000000d1
Tree Id: 0x00000000
Session Id: 0x0000040004000035 Acct:a.sangwan Domain:ASHISH-PC Host:
Signature: 00000000000000000000000000000000
[Response to: 13]
[Time from request: 0.000762000 seconds]
Session Setup Response (0x01)
StructureSize: 0x0009
0000 0000 0000 100. = Fixed Part Length: 8
.... .... .... ...1 = Dynamic Part: True
Session Flags: 0x0000
.... .... .... ..0. = Null: False
.... .... .... ...0 = Guest: False
Security Blob: <MISSING>: NO DATA
Offset: 0x00000000
Length: 0

Regards,
Ashish
Post by Shirish Pargaonkar
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/n
Ashish Sangwan
2014-07-11 05:47:48 UTC
Permalink
Post by Shirish Pargaonkar
In order to sec=ntlmv2 succeed, you will need this patch on the Windows 7 box.
http://support.microsoft.com/kb/957441/en-us
For smb2 (vers=2.0), sec=ntlmssp (which is the default) should succeed against
a Windows 7 box.
Would it be possible to attach a wireshark trace of the exchange?
PFA

Regards,
Ashish
Shirish Pargaonkar
2014-07-11 21:05:52 UTC
Permalink
Can you check the value of the registry setting on the server?

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\LMCompatibilityLevel
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Ashish Sangwan
2014-07-16 04:08:00 UTC
Permalink
Hi Shirish,

LMCompatibilityLevel is set at 2

Regards,
Ashish
------- Original Message -------
Sender : Shirish Pargaonkar<***@gmail.com>
Date : Jul 12, 2014 02:35 (GMT+05:30)
Title : Re: connecting to windows server with SMB2

Can you check the value of the registry setting on the server?

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\LMCompatibilityLevel
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Hel
Shirish Pargaonkar
2014-07-16 04:09:41 UTC
Permalink
Can you change it to 3 (or higher upto 5), I think then ntlmv2 will
start working.
Post by Ashish Sangwan
Hi Shirish,
LMCompatibilityLevel is set at 2
Regards,
Ashish
------- Original Message -------
Date : Jul 12, 2014 02:35 (GMT+05:30)
Title : Re: connecting to windows server with SMB2
Can you check the value of the registry setting on the server?
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\LMCompatibilityLevel
Post by Ashish Sangwan
I am using kernel version 3.8.13 and windows 7.
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=1.0 -o sec=ntlm
Linux#> mount -t cifs //107.109.224.147/sharefolder /mnt -o user=a.sangwan -o pass=xxxx -o vers=2.0 -o sec=ntlm
[ 0][ 64.276000] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 0][ 64.284000] CIFS VFS: Send error in SessSetup = -13
Tried with sec=ntlmv2/none/lanman/krb5, none of them worked.
Help please!!
Loading...