Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to permanently mount a windows server share via fstab and netfs on a CentOS 5.x box.

I can successfully mount and access the share via the following command:

mount.cifs // /mnt/foo --verbose -o rw,-dom=addomain,credentials=/opt/foo2/etc/cred.file,dir_mode=0775,file_mode=0664,soft

That works fine.

So then I unmounted it and added the following line to /etc/fstab:

//    /mnt/foo     cifs     rw,-dom=addomain,credentials==/opt/foo2/etc/cred.file,dir_mode=0775,file_mode=0664,soft     0     0

And when I run service netfs start I get the following error:

Mounting CIFS filesystems: error -1 opening credential file 

For security purposes, I've set owner and group for the credential file to root:root and file permissions to 0400

I'm running all commands (both mount test and netfs start command) as root user so I don't see why there's a permission issue.

I've also tested this procedure on another box (with a different share) and it works fine.

Can someone tell me if there are any netfs debug logs I can check here? What else can I do to troubleshoot?

share|improve this question
up vote 0 down vote accepted

(*sigh) User error =(

The problematic system actually had credentials== in the fstab options. The extra = was confusing mount.cifs (rightly so).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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