Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 //winserver.addomain.int/shared /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:

//winserver.addomain.int/shared    /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

1 Answer 1

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

 
discard

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.