博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu mount cifs
阅读量:4224 次
发布时间:2019-05-26

本文共 1073 字,大约阅读时间需要 3 分钟。

问题场景:有一台服务器A,它的ip地址是192.168.1.1共享了一个目录sharefolder,服务器A和我的Windows 7机器B在同一个域:MyDomain中,我在windows 7上可以执行, 直接访问服务器A的共享目录的内容。另外有一台ubuntu 12.10机器C,也想访问服务器A,该如何操作?

解决步骤

在ubuntu机器上执行mount cifs命令

$ mkdir /mnt/shared

$ sudo mount -t cifs //192.168.1.1/sharefolder /mnt/shared

提示错误信息

mount: wrong fs type, bad option, bad superblock on //192.168.1.1/sharefolder,

    missing codepage or helper program, or other error

    (for several filesystems (e.g. nfs, cifs) you might

    need  a /sbin/mount.<type> helper program)

    In some cases useful info is found in syslog - try dmesg | tail or so

从上面这段错误信息中,我们发现失败的原因是缺少mount.cifs 应用程序。经过google搜索发现mount.cifs是cifs-utils包中。我们需要先安装cifs-utils

$ sudo apt-get install cifs-utils

安装成功后,我们再次执行命令

$ sudo mount -t cifs //192.168.1.1/sharefolder /mnt/shared

这时仍然提示错误:

mount error(13): Permission denied

因为已经使用sudo命令执行,应该不是root用户的原因,而是没有权限访问服务器A,回想起我的window7机器B和服务器A在同一个域中,我登录机器B也是用的域账户和域密码。因此从window机器B访问服务器A不需要密码,但是ubuntu机器C却是需要的。因此我尝试增加域账户和密码再次登录

$ sudo mount -t cifs //192.168.1.1/sharefolder /mnt/shared -o username=MyDomain/myname, password=mypasswd

命令执行成功。

 

转载地址:http://gcuqi.baihongyu.com/

你可能感兴趣的文章
游戏感:虚拟感觉的游戏设计师指南——第十八章 我想做的游戏
查看>>
游戏设计的艺术:一本透镜的书——第十章 某些元素是游戏机制
查看>>
游戏设计的艺术:一本透镜的书——第十一章 游戏机制必须平衡
查看>>
UVM:7.5.1 期望值与镜像值
查看>>
UVM:7.5.2 常用操作及其对期望值和镜像值的影响
查看>>
UVM:7.6.1 检查后门访问中hdl 路径的sequence
查看>>
UVM:7.6.2 检查默认值的sequence
查看>>
UVM:7.7.1 使用reg_predictor
查看>>
UVM:7.7.2 使用UVM_PREDICT_DIRECT功能与mirror 操作
查看>>
UVM:7.7.3 寄存器模型的随机化与update
查看>>
UVM:7.7.4 扩展位宽
查看>>
UVM:7.8.1 get_root_blocks
查看>>
UVM:7.8.2 get_reg_by_offset 函数
查看>>
UVM:8.2.2 重载的方式及种类
查看>>
UVM:8.2.3 复杂的重载
查看>>
UVM:8.2.4 factory 机制的调试
查看>>
UVM:8.3.1 重载transaction
查看>>
UVM:8.3.2 重载sequence
查看>>
leetcode171.[math] Excel Sheet Column Number
查看>>
Log4j配置
查看>>