1. 程式人生 > >samba企業級實戰應用詳解-技術流ken

samba企業級實戰應用詳解-技術流ken

form ima all lock use root stop ORC 系統版本

1.簡介

Samba是一套使用SMB(Server Message Block)協議的應用程序, 通過支持這個協議, Samba允許Linux服務器與Windows系統之間進行通信,使跨平臺的互訪成為可能。

2.系統環境

系統版本:centos6.7

  服務器IP: 10.220.5.166/24

3.關閉安全服務

[root@ken ~]# service iptables stop
[root@ken ~]# setenforce 0

4. 安裝samba

[root@ken ~]# yum install samba -y

5.配置samba

[root@ken ~]# vim /etc/samba/smb.conf
...
 # Backend to store user information 
in. New installations should 98 # use either tdbsam or ldapsam. smbpasswd is available for backwar ds 99 # compatibility. tdbsam requires no further configuration. 100 101 security = share #101行處修改安全級別為share 102 passdb backend = tdbsam 103 104 105 # ----------------------- Domain Members Options ----------------- ------- 106
# 107 # Security must be set to domain or ads 108 # 109 # Use the realm option only with security = ads 110 # Specifies the Active Directory realm the host is part of ... .... 246 #============================ Share Definitions ================== ============ 247 [ken] #247行處添加如下代碼,等號前後需要有空格
248 comment = ken 249 path = /ken #定義共享路徑 250 writable = yes 251 public = yes

6.創建共享目錄

[root@ken ~]# mkdir /ken

7.修改共享目錄權限

[root@ken ~]# chmod -R 777 /ken

8.重啟samba服務

[root@ken ~]# service smb restart
Shutting down SMB services:                                [FAILED]
Starting SMB services:                                     [  OK  ]

9.window訪問

技術分享圖片

按回車鍵

技術分享圖片

10.寫入數據測試

技術分享圖片

測試完成。

因為熱愛 所以熾熱

--技術流ken

samba企業級實戰應用詳解-技術流ken