mount.cifs : mount error(12) : Cannot allocate memory

Not sure if there is a workaround on the Linux side, but the fix on the Windows side definitely works.

Most posts on the web mention 2 registry keys and a reboot. In fact, only one registry change is needed on Windows 7, and no reboot. Only a service restart.

Talk to your Windows sysadmin. If you can get him/her to copy/paste this into a command prompt, it should work:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v Size /t REG_DWORD /d 3 /f
sc stop  LanmanServer
sc start LanmanServer

When I encountered this, I just restarted the 'Server' service in Windows 7, and then the mount worked.


I've finally solved this the solution was to add the ''sec=ntlm'' option for mount.cifs because the default behaviour changed. From

man mount.cifs
...
The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the default was changed to sec=ntlmssp.
...

So my /etc/fstab entries now look like...

# Network drives
//Server/to_mount1/mnt/network1 cifs     credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline, sec=ntlm 0 0
//Server/to_mount2/another/dir /mnt/network2    cifs        credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline,sec=ntlm 0 0
//Server/to_mount3  /mnt/network3   cifs        credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline,sec=ntlm 0 0

Tags:

Mount

Kernel

Cifs