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 maintaining a heterogeneous network of mac and linux so I decided to create a little perl script to unify mounting strategies across machines.

The current implementation in linux is in /etc/fstab works fine:

//myserverhere.com/cifs_share /mnt/cifs_share cifs user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs 0 0

and /root/.cifs contains

username=ouruser
password=ourpassword

I tried translating that to a non-fstab format as follows:

mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs

But it doesn't seem to work.

Can someone point out what I'm doing wrong please?

Thanks in advance.

Ismael Casimpan :)

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Syntax of mount.cifs:

mount.cifs {service} {mount-point} [-o options] 

You need to pass the options after the "-o"; for example, if your options are rigth (not tested) your command should be:

mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share -o user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
share|improve this answer
    
the '-o' was the one I forgot. Thanks for pointing out. I tried it and it now works. Thank you so much :) –  icasimpan Mar 9 '12 at 8:15
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.