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 have this line and it works

mount -t cifs -o myuser //192.168.0.12/Public/Docs /mnt/cifs_shares/Docs

But then I try with autofs and it doesn't

In /etc/auto.master:

/mnt/cifs_shares/Docs       /etc/auto.cifs_shares

and in /etc/auto.cifs_shares

Docs   -fstype=cifs,rw,noperm,credentials=/etc/credentials.txt   ://192.168.0.12/Public/Docs

it seems that the thing gets mounted actually, but it turns to be empty.

When mounted with mount it's not empty at all

What am I missing ?

I'm on Centos 6.3 64 bits

share|improve this question
add comment

1 Answer

I had similar problems with mounting a CIFS share on CentOS 6.3 64-bit - the documentation I found doesn't seem to document two additional arguments that need to be set up in the auto.master file for this to work.

Here's what worked for me and might likely work for you (modified a little to fit your example):

At bottom of /etc/auto.master:

/mnt/cifs_shares     /etc/auto.cifs_shares     --timeout=600     --ghost

In /etc/auto.cifs_shares:

Docs     -fstype=cifs,rw,noperm,credentials=/etc/credentials.txt     ://192.168.0.12/Public/Docs

Then do a:

service autofs restart

Now, if you do:

ls /mnt/cifs_shares/Docs

And you have the correct permissions, username/password, etc. you should see your files in the share. Note that the first item in the auto.cifs_shares file 'Docs' is the name of the share that appears in the /mnt/cifs_shares folder.

Otherwise, look for error messages for further debugging:

tail -n 50 /var/log/messages

Here's another reference that seems to work:

share|improve this answer
    
sixdim, thank you. Your suggestion worked from a Fedora 17 box but NOT from the Centos 6.3 box. It's a progress anyway –  user1632812 Dec 18 '12 at 16:16
add comment

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.