Ubuntu下samba服務的安裝部署

來源:互聯網
上載者:User

Ubuntu下samba服務的安裝部署 一、環境: 1、Server OS:Ubuntu 12.04 Server(VMware虛機) IP:192.168.1.1662、測試連接機 windows7 IP:192.168.1.100 二、安裝與部署:  1.軟體安裝 Java代碼  sudo apt-get install samba   2.建立共用資料夾(或自由選擇檔案夾) Java代碼  sudo mkdir -p /srv/samba/share  sudo chown nobody.nogroup /srv/samba/share/   3.修改設定檔 vi /etc/samba/smb.conf  3.1 在[global]中修改如下兩項: Java代碼  # Change this to the workgroup/NT-domain name your Samba server will part of     workgroup = WORKGROUP       # "security = user" is always a good idea. This will require a Unix account  # in this server for every user accessing the server. See  # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html  # in the samba-doc package for details.  #   security = user     security = share     其中若配置security = user在訪問時需提供使用者/密碼(Server系統預建立), security = share表示訪問無需密碼  3.2 在檔案末尾追加如下片段: Java代碼  [share]      comment = Ubuntu File Server Share      path = /srv/samba/share      browsable = yes      guest ok = yes      read only = no      create mask = 0755      配置項含義: [share]:共用檔案名稱comment:共用描述,自由修改path:共用資料夾路徑browsable:是否可以通過Windows Explorer進行共用瀏覽,若為no則windows訪問共用時看不到該共用資料夾guest ok:是否可以無密碼訪問該共用read only:是否唯讀,no表示有寫入權限create mask:建立的新檔案的許可權 若有多個共用資料夾,則添加多個[share]配置片段。  3.3 重啟相關服務 Java代碼  sudo restart smbd  sudo restart nmbd   三、測試功能 1、window7中運行 \\192.168.1.166,可查看和使用共用資料夾share2、在"網路"中亦可發現共用資料夾 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.