Centos掛載windows域控共用目錄

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.