Samba服务器搭建

作为服务器的机器IP:192.168.124.129  主机名:Centos 操作系统:CentOS 5.5

 

1、  软件安装

yum –y install samba*

2、  配置

#======================= Global Settings =====================================

 

[global]

 

# ----------------------- Network Related Options -------------------------

#

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH

#

# server string is the equivalent of the NT Description field

#

# netbios name can be used to specify a server name not tied to the hostname

#

# Interfaces lets you configure Samba to use multiple interfaces

# If you have multiple network interfaces then you can list the ones

# you want to listen on (never omit localhost)

#

# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can

# specifiy it as a per share option as well

#

        workgroup = WORKGROUP

        server string = Samba Server Version %v

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

       max log size = 50

 

# ----------------------- Standalone Server Options ------------------------

        security = user

 

 

#[homes]

;       comment = Home Directories

;       browseable = no

;       writable = yes

;       valid users = %S

;       valid users = MYDOMAIN\%S

 

[www]

        comment = webroot

        path = /var/www

        writable = yes

        browseable yes

        valid users = apache

文件件权限设置:

[root@localhost var]# setfacl -m u:apache:rwx www/

[root@localhost var]# setfacl -m d:u:apache:rwx www/

 

3、  设置开机自启动

Chkconfig smb on

4、  测试

Linux里边访问windows共享的资源

posted @ 2014-02-25 20:30  jamesbd  阅读(154)  评论(0编辑  收藏  举报