亚洲欧洲国产欧美一区精品,激情五月亚洲色五月,最新精品国偷自产在线婷婷,欧美婷婷丁香五月天社区

      考試首頁(yè) | 考試用書(shū) | 培訓(xùn)課程 | 模擬考場(chǎng) | 考試論壇  
        當(dāng)前位置:Linux認(rèn)證 > 紅帽認(rèn)證 > 紅帽認(rèn)證輔導(dǎo) > 文章內(nèi)容
        

      RHCE學(xué)習(xí)筆記:安裝Samba并配置Firewalld和SELinux,和Windows共享文件

      來(lái)源:Linux中國(guó) [ 2016年1月21日 ] 【

      步驟三: 配置 SELinux 和 Firewalld

      在配置 /finance 作為 Samba 共享目錄之前,我們需要像下面那樣停用 SELinux 或設(shè)置恰當(dāng)?shù)牟紶栔岛桶踩x項(xiàng)(否則,SELinux 會(huì)阻止客戶端訪問(wèn)共享目錄):

      1. # setsebool -P samba_export_all_ro=1 samba_export_all_rw=1
      2. # getsebool –a |grep samba_export
      3. # semanage fcontext –at samba_share_t"/finance(/.*)?"
      4. # restorecon /finance

      另外我們必須確保 firewalld 允許 Samba 流量通過(guò)。

      1. # firewall-cmd --permanent --add-service=samba
      2. # firewall-cmd --reload

       

      步驟四: 配置 Samba 共享目錄

      現(xiàn)在我們來(lái)看看配置文件 /etc/samba/smb.conf 并添加用于共享的章節(jié)(section):我們希望組 finance 的成員可以瀏覽 /finance 的內(nèi)容,在里面保存/創(chuàng)建文件或者子目錄(默認(rèn)權(quán)限為 0777,組所有者為 finance):

      smb.conf


      1. [finance]
      2. comment=Directoryfor collaboration of the company's finance team
      3. browsable=yes
      4. path=/finance
      5. public=no
      6. valid users=@finance
      7. write list=@finance
      8. writeable=yes
      9. create mask=0770
      10. Force create mode=0770
      11. force group=finance

      保存文件然后用 testparm 工具進(jìn)行測(cè)試。如果這里有任何錯(cuò)誤,命令的輸出或提示你需要如何修復(fù)。否則,會(huì)顯示你 Samba 服務(wù)器配置的回顧:

      測(cè)試 Samba 配置

      測(cè)試 Samba 配置

      如果你要添加另一個(gè)公開(kāi)的共享目錄(意味著不需要任何驗(yàn)證),在 /etc/samba/smb.conf 中創(chuàng)建另一章節(jié),在共享目錄名稱下面復(fù)制上面的章節(jié),只需要把 public=no 更改為 public=yes 并去掉有效用戶(valid users)和寫(xiě)列表(write list)命令。

      將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動(dòng)訪問(wèn)考試網(wǎng) | 復(fù)制本頁(yè)地址,傳給QQ/MSN上的好友 | 申請(qǐng)鏈接 | 意見(jiàn)留言 TOP
      關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
      Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved