Anyone have an idea why a cifs mounted share suddenly doesn't work in fstab? I can mount it from the command line, but mount -a gives:

unknown file system '-o'.

I had a bit of trouble getting it to work a few weeks ago, but after some research I figured out the line that I needed.

//10.x.x.x/shared /mnt/shared -o credentials=/etc/cifspwd,rw,dir_mode=0777,file_mode=0777 0 0

Then after updating last week and rebooting the server, it wouldn't mount and I had to "skip" it. As I mentioned, I can mount it manually, but not via fstab.

I'm running server 12.04


Don't put -o in fstab. The fourth field is the options that will be passed to mount. And you're missing the filesystem type. The line should be like this:

//10.x.x.x/shared /mnt/shared cifs credentials=/etc/cifspwd,rw,dir_mode=0777,file_mode=0777 0 0

See also: fstab manpage.

  • Thanks! That worked. I wonder why it worked prior to the update. – Mjj May 28 '13 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.