问题
I try to mount cifs, but i have got following error and i don't find the error.
~# mount -a
~# mount error(22): Invalid argument
I try if in my /etc/fstab
//192.168.0.1/ShareRep /home/user/share cifs credentials=/usr/local/etc/whisper.credentials,uid=501,sec=ntml 0 0
my credentials file /usr/local/etc/whisper.credentials
username=user
password=password
I am on Debian 7.6
回答1:
In the absence of a more detailed error from dmesg
I do see one typo that will cause things to fail. You have the option sec=ntml
. This is is wrong and should be sec=ntlm
. Notice how ml should be lm
It was determined that the OP was using OS/X as a Samba file server. There are some modifications (voodoo magic) to the options that need to be made to get this to work on most flavours of Linux. In partiuclar you need to specify the options nounix,sec=ntlmssp,noperm
. I found this buried in a Ubuntu question (and answers) that mentions a thread of messages on the Apple forums. In summary this appeared:
With reference to this post in Apple discussion community, you can try to mount with additional two options: nounix,sec=ntlmssp
A followup post suggested noperm
might be needed as well.
If you modify your fstab entry to be this it may work:
//192.168.0.1/ShareRep /home/user/share cifs credentials=/usr/local/etc/whisper.credentials,uid=501,nounix,sec=ntlmssp,noperm 0 0
来源:https://stackoverflow.com/questions/26000289/debian-7-fstab-mount-cifs-invalid-argument