欢迎光临
我们一直在努力

Centos挂载windows域控共享目录

一 环境

  SERVER:windows server 2012 R2 DC域控 IP:192.168.1.11

  CLIENT:Centos 6.5

二 mount挂载

  命令:

mount -t cifs -o username='test\testuser',password='test' "//192.168.1.11/server test/test" /mnt/test
mount: block device //192.168.1.11/server test/test is write-protected, mounting read-only
mount: cannot mount block device //192.168.1.11/server test/test read-only

  报错:write-protected, mounting read-only

  需要安装: 

yum install cifs-utils.x86_64

  安装完成之后 继续执行就可以。

三 开机自动挂载

 mount挂载完成之后,关机之后就失效了,可以通过修改/etc/fstab 文件实现开机挂载 添加一行:

"//192.168.1.11/server test/test"   /mnt/test cifs  auto,username=‘test\testuser’,password=‘test’  0 0

四 其他

  -t cifs(common internet file system) 指定文件类型

  -o 指定文件挂载时的选项 ro 只读 rw 读写

  username和password是登录的用户名和密码,域环境下用户名需要加上域名

  共享的目录地址,如果目录名有空格需要用双引号””

  linux挂载域环境下服务器的共享目录需要用户的账号有对共享文件的读和写权限。

五 参考链接

  http://blog.chinaunix.net/uid-8810763-id-2453890.html mount命令详解

  http://blog.csdn.net/jingxia2008/article/details/50218933 mount失败密码hash问题

  http://blog.csdn.net/lanyou1900/article/details/39612585 开机自动挂载

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。