一,安装samba4

不要直接 yum install samba ,默认安装的是samba3版本,但这个版本有问题(open_rpc_pipe_p: copy_serverinfo failed这个错误)
 
所以这里安装samba4 版本
//查看源
[root@yohuu14 samba]# yum list samba*.*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: centos.ustc.edu.cn
 * updates: mirrors.163.com
Installed Packages
samba4.x86_64                                                                                                              4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-client.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-common.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-libs.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-winbind.x86_64                                                                                                      4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-winbind-clients.x86_64                                                                                              4.0.0-66.el6_6.rc4                                                                                         @base  
Available Packages
samba.x86_64                                                                                                               3.6.23-21.el6_7                                                                                            updates
samba-client.x86_64                                                                                                        3.6.23-21.el6_7                                                                                            updates
samba-common.i686                                                                                                          3.6.23-21.el6_7                                                                                            updates
samba-common.x86_64                                                                                                        3.6.23-21.el6_7                                                                                            updates
samba-doc.x86_64                                                                                                           3.6.23-21.el6_7                                                                                            updates
samba-domainjoin-gui.x86_64                                                                                                3.6.23-21.el6_7                                                                                            updates
samba-glusterfs.x86_64                                                                                                     3.6.23-21.el6_7                                                                                            updates
samba-swat.x86_64                                                                                                          3.6.23-21.el6_7                                                                                            updates
samba-winbind.x86_64                                                                                                       3.6.23-21.el6_7                                                                                            updates
samba-winbind-clients.i686                                                                                                 3.6.23-21.el6_7                                                                                            updates
samba-winbind-clients.x86_64                                                                                               3.6.23-21.el6_7                                                                                            updates
samba-winbind-devel.i686                                                                                                   3.6.23-21.el6_7                                                                                            updates
samba-winbind-devel.x86_64                                                                                                 3.6.23-21.el6_7                                                                                            updates
samba-winbind-krb5-locator.x86_64                                                                                          3.6.23-21.el6_7                                                                                            updates
samba4-dc.x86_64                                                                                                           4.0.0-66.el6_6.rc4                                                                                         base   
samba4-dc-libs.x86_64                                                                                                      4.0.0-66.el6_6.rc4                                                                                         base   
samba4-devel.x86_64                                                                                                        4.0.0-66.el6_6.rc4                                                                                         base   
samba4-pidl.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-python.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         base   
samba4-swat.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-test.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-winbind-krb5-locator.x86_64                                                                                         4.0.0-66.el6_6.rc4                     
 
[root@yohuu14 samba]# yum install -y samba4
 
[root@yohuu14 samba]# yum install -y samba4-winbind.x86_64 samba4-client.x86_64 samba4-winbind-clients.x86_64 
 
[root@yohuu14 samba]# rpm -qa|grep samba
samba4-winbind-clients-4.0.0-66.el6_6.rc4.x86_64
samba4-client-4.0.0-66.el6_6.rc4.x86_64
samba4-libs-4.0.0-66.el6_6.rc4.x86_64
samba4-4.0.0-66.el6_6.rc4.x86_64
samba4-winbind-4.0.0-66.el6_6.rc4.x86_64
samba4-common-4.0.0-66.el6_6.rc4.x86_64
 
 
二,设置防火墙
 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
三,授权共享权限 
 
useradd operate
 
smbpasswd -a  operate //添加smb登录用户并设置密码(注意系统中必须存在相同的用户名)
 
smbpasswd -x  operate //删除
 
[root@yohuu14 samba]# cat smb.conf
[global]
server string = Samba Server
dos charset = GB2312
unix charset = GB2312
display charset = GB2312
security = share
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
 
[share]
public = yes
path = /home/samba/share   //无密码即可访问可以设置 chown nobody.nobody /home/samba/share 和 chmod 777 /home/samba/share
 
[operate]
workgroup = operate
netbios name= operate
path = /home/samba/operate  //chown operate.operate /home/samba/share 和 chmod 777 /home/samba/operate
browseable = yes
writeable = yes
 
 
四,重启服务
service smb restart
 
windows 中
运行cmd 中//IP 访问,输入上面设置密码即可。
 
 
 
 
 
 

samba 服务器的搭建的更多相关文章

  1. 自学linux——20.Samba服务器的搭建

    Samba服务器的搭建 一.Samba的认识 1.Samba是一个能让Linux系统应用Microsoft网络通讯协议的软件 2.Samba不仅用于Linux与windows系统直接的文件共享和打印共 ...

  2. Linux samba服务器的搭建

    目录 1. 安装samba 2. 配置smb.conf 3. 创建samba登陆用户 4. 创建samba共享文件夹 5. 重启samba服务 6. 访问samba共享文件夹 7. 参考资料 1. 安 ...

  3. Red Hat 6.5 Samba服务器的搭建(登录访问)

    搭建Samba服务器是为了实现Linux共享目录之后,在Windows可以直接访问该共享目录. 现在介绍如何在红帽6.5系统中搭建Samba服务. 搭建Samba服务之前,yum源必须配置好,本地源和 ...

  4. Red Hat 6.5 Samba服务器的搭建(匿名访问,免登录)

    搭建Samba服务器是为了实现Linux共享目录之后,在Windows可以直接访问该共享目录. 现在介绍如何在红帽6.5系统中搭建Samba服务. 搭建Samba服务之前,yum源必须配置好,本地源和 ...

  5. samba服务器的搭建及使用

    一.Samba服务器的安装及配置 1.samba服务器的安装 rpm –ivh /mnt/Packages/samba-3. 5. 10-125. el6.i686.rpm 需要挂载红帽6的光盘 2. ...

  6. Linux中samba服务器的搭建

    使用的vmware12虚拟机安装的centos6.8和物理机上的windows10,实现在windows10 上访问CentOs上的samba服务. 一.先查看系统中是否安装有samba服务相关的软件 ...

  7. samba服务器的搭建和配置

    案例: 公司有两个部门, sales / market . 分别有成员 jack / tom 和 zhang / shen . 公司需求是这样的, 本部门资料禁止其他部门访问, 本部门成员之间不能干扰 ...

  8. samba服务器的搭建和用户权限,文件夹权限设置

    一.简介:samba服务是基于netbios  安装: 通过yum安装 [root@localhost ~]# yum install samba samba-client samba-swat 查看 ...

  9. CentOS 6.7下 Samba服务器的搭建与配置(share共享模式)

    https://www.linuxidc.com/Linux/2016-12/138220.htm

随机推荐

  1. [leetcode 19] Remove Nth Node From End of List

    1 题目 Given a linked list, remove the nth node from the end of list and return its head. For example, ...

  2. 打印出所有的 "水仙花数 ",所谓 "水仙花数 "是指一个三位数 其各位数字立方和等于该数本身。 例如:153是一个 "水仙花数 " 因为153=1*1*1+5*5*5+3*3*3

    for (int i = 100; i <= 999; i++) { int geWei, shiWei, baiWei; baiWei = i / 100; shiWei = (i - bai ...

  3. openSUSE 13.1 Milestone 4 发布

    openSUSE 13.1 发布第四个里程碑版本,下载地址: openSUSE-Factory-KDE-Live-Build0652-x86_64.iso (949MB, MD5, torrent) ...

  4. 《Linux内核设计与实现》读书笔记(十六)- 页高速缓存和页回写

    好久没有更新了... 主要内容: 缓存简介 页高速缓存 页回写 1. 缓存简介 在编程中,缓存是很常见也很有效的一种提高程序性能的机制. linux内核也不例外,为了提高I/O性能,也引入了缓存机制, ...

  5. CoreCLR on Mac:体验managed exception handling

    C#测试代码: using System; class Program { static void A() { try { Console.WriteLine("Throwing an ex ...

  6. Hadoop2.4.x 实例测试 WordCount程序

     在实例测试前先确保hadoop 启动正确 Master.Hadoop: word 1[hadoop@Master input]$ jps6736 Jps6036 NameNode4697 Secon ...

  7. js 调整排序

    <html> <head> <script type='text/javascript' src='jquery-1.8.2.min.js'></script ...

  8. HTML Meta标签知多少

    文章已同步至个人Blog:Benjamin - 专注前端开发和用户体验 一.基本属性 标签常常被用来定义HTML文档的元数据或者HTTP协议的指向,这些元数据常用在SEO.HTML Pages or ...

  9. CSS/JS图片鼠标悬浮一道光闪过

    看到有些网站logo鼠标悬浮上面的时候,会出现一道光,一闪而过,刚开始以为是gif图,已审查, 居然不是:现在就实现在这种效果: 先看看CSS实现的效果图: 看到没,就是这道刺眼的白光....   啊 ...

  10. 插件~使用ECharts动态在地图上标识点

    ECharts可以很方便的在网页上绘制地图,图表,并且可以提供下载图像,放大,缩小,拖动等功能,今天主要说一下它的地图类型(type:'map')是如何实现的. 首先在ECharts地图的坐标需要我们 ...