標籤:centos mount 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-onlymount: 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域控共用目錄