首页 > 代码库 > Centos挂载windows域控共享目录
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域控共享目录
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。