Mounting Windows shares in Linux/Unix boxes isn’t exactly the easiest thing to do, while a simple command like:
# mount -t cifs //server/share -o username=UserName,password=myPassword /share
Can turn into a headaches like this:
# mount -t cifs //server/share -o username=UserName,password=myPassword /share mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
This issue seems to be related to Windows; here’s a fix!
Modify the Registry of the Windows system you are trying to connect too with these settings:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache - set it to 1 HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size - set it to 3
Go into your system services in the Windows system and restart the ‘Server’ service, you may get a warning about it restarting the ‘Computer Browser’ service as well, click yes and continue.
Now try to mount the CIFS share again and it will mount with no issues!