Mount -t cifs works on one version of linux but not another [closed]

邮差的信 提交于 2019-12-08 01:32:51

问题


I have a raspberry pi that I am trying to mount a remote samba share on, but I get permission denied. On another mounting the same share with th same command works.

Raspberry pi:

root@xbian:~# mount -t cifs //192.168.249.72/root /media/SS -o username=root,password=654321
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@xbian:~# uname -a
Linux xbian 3.9.8+ #2 PREEMPT Tue Jul 2 17:38:12 CEST 2013 armv6l GNU/Linux

Ubuntu:

root@dakLinux:~#  mount -t cifs //192.168.249.72/root /media/SS -o username=root,password=654321
root@dakLinux:~# uname -a
Linux dakLinux 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 i686 i686 GNU/Linux

Is this a kernel issue or a linux version issue? Is there a way to make this work?


回答1:


use sec=ntlm in the options

Kernel versions post 3.8.x have this changed, and mount.cifs doesn't pass this argument, explicitly, Hence fails

Refer: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=81bcd8b795229c70d7244898efe282846e3b14ce

mount -t cifs //192.168.249.72/root /media/SS -o username=root,password=654321,sec=ntlm

and it should work



来源:https://stackoverflow.com/questions/19412617/mount-t-cifs-works-on-one-version-of-linux-but-not-another

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