zoukankan      html  css  js  c++  java
  • CentOS 简单设置samba服务

    1、安装

      yum -y install samba

    2、设置配置文件

      1) 备份Samba的配置文件:cp  /etc/samba/smb.conf  /etc/samba/smb.conf.bak

      2) 在/etc/samba/smb.conf文件的末尾之添加如下字段:

    [koorey]
    comment = koorey
    path = /home/koorey
    writable = yes

      3) 向samba里面添加用户

      smbpasswd  -a   koorey  #添加用户koorey到Samba用户数据库中

    3、重启samba

      service smb restart

    4、关闭 iptables和selinux

      1) 在对待iptables的问题上:

      普通青年:直接在命令行敲…
      service iptables stop。
      文艺青年:依次在命令行敲…
      iptables -I RH-Firewall-1-INPUT 5 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
      iptables -I RH-Firewall-1-INPUT 5 -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
      iptables -I RH-Firewall-1-INPUT 5 -p udp -m udp --dport 137 -j ACCEPT
      iptables -I RH-Firewall-1-INPUT 5 -p udp -m udp --dport 138-j ACCEPT
      iptables-save
      service iptables restart
      2)同样,在对在selinux的问题上:(这丫的把我坑惨了呀)
      普通青年:直接在命令行敲…
      setenforce 0
      vi /etc/selinux/config
      将SELINUX=enforcing改为SELINUX=disabled为开机重启后不再执行setenfore节约光阴。
      文艺青年:依次在命令行敲…
      setsebool -Psamba_enable_home_dirs on
      setsebool -Psamba_export_all_rw on
      完事儿之后再:getsebool -a | grep samba一把,你懂得…

    来源:http://blog.chinaunix.net/uid-23069658-id-3142052.html

  • 相关阅读:
    没有上司的舞会
    邮票面值设计
    小木棍
    简单的试炼
    区间质数
    加工生产调度
    泥泞的道路
    总数统计
    中庸之道

  • 原文地址:https://www.cnblogs.com/fengbohello/p/5036119.html
Copyright © 2011-2022 走看看