CentOS安裝配置Samba伺服器

來源:互聯網
上載者:User

標籤:centos   samba   

假設我們有這樣一個情境
共用名稱     路徑         許可權SHAREDOC   /smb/docs    所有人員包括來賓均可以訪問RDDOCS     /smb/tech    僅允許特定組的使用者進行讀寫訪問
特定組的組名為RD,目前的有quwenzhe、zhanghongjie兩個人
1、安裝Samba   yum -y install samba samba-client samba-common2、建立共用目錄(假設共用/smb目錄下的檔案)# mkdir -p /smb/docs# mkdir -p /smb/tech3、配置核心參數# ulimit -n 16384# vi /etc/security/limits.conf  在最後加入以下內容 * - nofile 163844、配置Samba伺服器 # vi/etc/samba/smb.conf   刪除原有所有內容(vi刪除所有內容命令:用G轉到檔案尾-->ESC-->:1,.d),添加如下內容:
[global]  workgroup=BIGCLOUD  netbios name=ZZSRV2  server string=Samba Server  #security=share  security=user  map to guest = Bad User[SHAREDOCS]  path=/smb/docs  readonly=yes  browseable=yes  guest ok=yes[RDDOCS]  path = /smb/tech/  public = no  writable = yes  write list = @RD  validusers = @RD
5、建立使用者並分配許可權   //建立作業系統使用者# useradd quwenzhe# useradd zhanghongjie# useradd RD  //修改使用者的組# usermod -a -G RD quwenzhe# usermod -a -G RD zhanghongjie  //建立SAMBA使用者# smbpasswd -a quwenzhe# smbpasswd -a zhanghongjie  //修改目錄許可權# chown RD:RD /smb/tech/# chmod 770 /smb/tech  //查看服務狀態  #  ll -d /smb/tech     
6、啟動Samba伺服器# systemctl restart smb# systemctl enable smb# systemctl status smb    
7、測試連通性   // Linux上測試# smbclient -L localhost -U [email protected]    
   //Windows上測試   運行視窗輸入 \\192.168.24.244    
    將目標檔案直接拽入目標檔案夾,實現資源共用     8、Linux訪問Samba伺服器  smbclient //192.168.24.244/rddocs -U quwenzhe      
     到此,我們完成了Samba伺服器的安裝配置、windows訪問Samba伺服器、Linux訪問Samba伺服器的操作,希望我的講解可以協助大家進步。

CentOS安裝配置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.