Centos挂载windows域控共享目录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 开机自动挂载

本文出自 “天天向上” 博客,请务必保留此出处http://bshark.blog.51cto.com/10309374/1934609

以上是关于Centos挂载windows域控共享目录的主要内容,如果未能解决你的问题,请参考以下文章

centos 挂载windows共享目录

Centos 7挂载Windows server 2012 R2的NFS共享目录报错

centos7 使用mount -t cifs 挂载windows共享目录方法与问题解决

centos7挂载windows共享文件

centos7挂载Windows共享文件夹

centos 如何挂载 window共享文件夹