SAMBA服务j_0013.gif

1、 实验要求:

将目录 /usr/src 共享给所有人

    共享名设为 tools

    允许所有人访问、无需密码验证

        访问权限为只读

2、 安装软件包

[root@localhost ~]# rpm -q samba-client samba samba-common

package samba-client is not installed

package samba is not installed

package samba-common is not installed

[root@localhost ~]# cat /etc/yum.repos.d/server.repo  //yum的配置

[rhel]

name=Red Hat Enterprise Linux sever

baseurl=file:///misc/cd/Server

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@localhost yum.repos.d]# yum clean all

[root@localhost yum.repos.d]# yum -y install samba samba-client  samba-common                                   //安装samba

3、 修改主配置文件

[root@localhost ~]# vim /etc/samba/smb.conf

workgroup =tarena

server string = win7

log file = /var/log/samba/%m.log

max log size = 50

security = share

[tools]

     comment = Tools  Public

     path = /usr/src

      public = yes

      read only = yes

4、 开启服务

[root@localhost ~]# testparm          //配置文件检测

[root@localhost ~]# service smb start

[root@localhost ~]# chkconfig smb on

[root@localhost ~]# netstat -antup |grep mbd    //查看链接端口号

5、 客户机测试

Windows:UNC路径 \\192.168.55.254