I have autofs setup on my machines so I can access some shares on a WinXP box without having to worry about entering cryptic mount commands. A couple of weeks ago I discovered the shares were not accessible. Which I found… frustrating. I worked at it briefly and wasn’t able to come up with anything at the time. Today, I finally got back to it and was able to rectify the situation.
The automounter doesn’t give up much useful info to work with, so I went straight to the source and worked with the mount command. Here it is:
mount -t cifs //BILBO/All\ Users /mnt -o username=user,password=pw,domain=domain
This command resulted in the wonderfully cryptic result:
mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Do I even have to mention that the man page doesn’t have anything about this error? Well, just in case…
Googling yielded a couple of threads here and here that looked promising. The fixes described in those links require monkeying with the Windows registry on the machine with the shares. They also describe a specific error in the logs on the Windows machine which the machine I’m working with did not have. So I had a different problem.
I finally turned up a thread that offered up a rather novel fix: make sure that the share permissions and security were appropriately set on the WinXP machine. It seemed so banal and obvious, I had to go and check. Sure enough, I’d set the security on the shares properly, but not the permissions under the share tab. Thinking about it, I’m amazed it ever worked.
As soon as I made the changes, the mount command worked and so did autofs.
Yea me.