Debian 7, fstab, mount.cifs Invalid argument

随声附和 提交于 2019-12-22 18:57:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!