Ubuntu下Samba伺服器的最簡配置

來源:互聯網
上載者:User

一. Samba的安裝:

# sudo apt-get insall samba

# sudo apt-get install smbfs

二. 建立共用目錄:

# mkdir /home/willis/share

# sodu chmod 777 /home/willis/share

三. 建立Samba設定檔:

1. 儲存現有的設定檔

# sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

2. 建立新的Samba設定檔

# sodu vim /etc/samba/smb.conf

; ############### smb.conf #######################

[global]

    ; 建立工作組   

    workgroup = MYGROUP

    ; 安全模式, 我們設定最低安全層級

    security = share

    ; 是否允許guest使用者訪問

    guest ōk = yes

    usershare owner only = false

[share]

    ; 共用資料夾路徑

    path = /home/willis/share

    ; 讀許可權

    browseable = yes

    ; 寫入權限

    writeable = yes

四. 測試檔案配置結果

# testparm

五. 重啟Samba服務

# /etc/init.d/samba restart

六. 退出重新登陸或者重啟機器

七. 測試登陸

# smbclient -L //localhost/share

從遠端機子上測試:

# smbclient  //<samba_server_ip>/share

成功咯!

八. 參考資料

Ubuntu中設定samba共用可讀寫檔案夾:
http://forum.ubuntu.org.cn/about20852.html&highlight=samba

聯繫我們

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