# [Solved] mount.cifs issues on Vista,Win7, & Server 2008

## BonezTheGoon

Hello all, I just wanted to share something I recently learned after a very considerable amount of pain.  I searched a bit and didn't see this, my apologies if this has been previously documented.

If you are having trouble mounting Windows shares using the mount.cifs command you might need to consider a specific Microsoft issue.  They don't currently admit that this problem exists on Windows 7, but I have just tested and verified on several Linux machines and several Windows 7 machines that the documented changes also correct the behavior on Windows 7.  You can read about how to manually fix Windows 7 here which, again only Microsoft admits affects Vista and Server 2008.

For me once that registry value was correctly created and set all that was needed for a successful mount was the following command:

```

mount -t cifs //{servername}/{sharename} /{path-to-mount-locally} -o user={username},domain={domain/workgroup},sec=ntlmv2i

```

Of course depending on your Windows boxes your security value might need to be changed, for my environment the ntlmv2 with signing 'i' is needed.

Hope that can help anyone save themselves some time and some grief!

Regards,

BonezTheGoon

Edit: Added [Solved] to the subject, which should have been there all along.  Sorry!

----------

## BonezTheGoon

FYI, I forgot to mention the failure codes I had been receiving.  

On a RHEL5.4 machine at the terminal it complained:

```

mount error 22 = Invalid argument

Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
```

But in /var/log/messages it complained:

```

Aug 18 10:34:21 host kernel:  CIFS VFS: Unexpected SMB signature

Aug 18 10:34:21 host kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER

Aug 18 10:34:21 host kernel:  CIFS VFS: Send error in SessSetup = -22

Aug 18 10:34:21 host kernel:  CIFS VFS: cifs_mount failed w/return code = -22

```

Where as on a Gentoo box at the terminal it complained:

```

 CIFS VFS: Unexpected SMB signature

Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER

 CIFS VFS: Send error in SessSetup = -22

 CIFS VFS: cifs_mount failed w/return code = -22

mount error 22 = Invalid argument

Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

```

But all is well now, with the details I posted in my OP in this thread.

----------

