samba企业级实战应用详解-技术流ken

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

猜你喜欢

转载自www.cnblogs.com/kenken2018/p/9716661.html