Debian 7、fstab、mount.cifs 参数无效 [英] Debian 7, fstab, mount.cifs Invalid argument

查看:159
本文介绍了Debian 7、fstab、mount.cifs 参数无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试挂载 cifs,但出现以下错误,我没有找到错误.

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

如果在我的/etc/fstab 中,我试试

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 

我的凭据文件/usr/local/etc/whisper.credentials

my credentials file /usr/local/etc/whisper.credentials

username=user
password=password

我使用的是 Debian 7.6

I am on Debian 7.6

推荐答案

在没有来自 dmesg 的更详细错误的情况下,我确实看到了一个会导致事情失败的错字.您可以选择 sec=ntml .这是错误的,应该是 sec=ntlm .注意 ml 应该是 lm

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

确定 OP 使用 OS/X 作为 Samba 文件服务器.需要对选项进行一些修改(巫术魔术)才能使其适用于大多数 Linux 风格.在partiuclar 中,您需要指定选项nounix,sec=ntlmssp,noperm.我发现这个隐藏在 Ubuntu 问题(和答案)中这提到了苹果论坛上的一条消息.总而言之,这出现了:

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:

参考 Apple 讨论社区中的这篇帖子,您可以尝试使用另外两个选项进行挂载:nounix,sec=ntlmssp

With reference to this post in Apple discussion community, you can try to mount with additional two options: nounix,sec=ntlmssp

可能还需要建议 noperm 的后续帖子.

A followup post suggested noperm might be needed as well.

如果您将 fstab 条目修改为这样,它可能会起作用:

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 

这篇关于Debian 7、fstab、mount.cifs 参数无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆