centos 掛載windows共用目錄

來源:互聯網
上載者:User

標籤:

  1. su (擷取root許可權)
  2. yum install samba 安裝samba (其實我們只用到samba裡面的winbind以便我們能夠用windows機器的名稱找到該機器的網路地址,在下面敘述的過程會用到。而且也要確定在windows機器上的網卡的協議裡面有安裝microsoft網路用戶端和microsoft網路檔案和印表機共用兩個網路通訊協定)
  3. vi /etc/nsswitch.conf 找到hosts: files dns改成hosts: files dns wins (這一步也是關於讓我們能夠通過windows機器的名稱找到該機器的網路地址)
  4. yum install samba-client 安裝samba用戶端(將會用它來訪問windows機器)
  5. yum install cifs-utils 安裝cifs工具包 (用於取代被淘汰的smbfs)
  6. vi /etc/.smbpasswd (添加一下內容用於存放訪問windows機器的使用者名稱和密碼)username = usernamepassword = password
  7. mkdir /mnt/掛載點名稱 (建立一個掛載點)
  8. vi /etc/fstab 添加以下內容讓作業系統啟動後自動掛載windows機器上的共用資料夾到掛載點//你的windows機器名/共用資料夾名 /mnt/你建立的掛載點 cifs rw,credentials=/etc/.smbpasswd 0 0
  9. mount -a (讓系統重新掛載所有在/etc/fstab檔案裡面定義的掛載點)
  10. cd /mnt/掛載點名稱即可

    

     參考:

        http://www.cyberciti.biz/tips/how-to-mount-remote-windows-partition-windows-share-under-linux.html       

        http://serverfault.com/questions/352305/why-can-windows-machines-resolve-local-names-when-linux-cant

        http://www.linuxquestions.org/questions/red-hat-31/mount-cifs-not-present-on-centos-6-2-%5Bsolved%5D-931736/

        http://www.kernelhardware.org/access-windows-shares-in-linux/

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.