Chinaunix首页 | 论坛 | 博客
  • 博客访问: 669158
  • 博文数量: 121
  • 博客积分: 1425
  • 博客等级: 中尉
  • 技术积分: 2059
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-03 15:34
文章分类

全部博文(121)

文章存档

2018年(1)

2017年(2)

2016年(1)

2015年(11)

2014年(14)

2013年(47)

2012年(45)

分类: LINUX

2013-07-05 10:12:45

首先我们要检查一下系统是否有samba服务
#  rpm -qa | grep samba
samba-winbind-clients-3.6.9-151.el6.i686
samba-common-3.6.9-151.el6.i686
samba-winbind-3.6.9-151.el6.i686
samba-3.6.9-151.el6.i686

以上是安装了 要是没有安装的话  你可以这样来安装
 #yum  -y install samba smbfs smbclient
这样就安装

编辑配置文件如下
# vi /etc/samba/smb.conf

[global]
workgroup = WORKGROUP  (自己设置的工作组)
display charset = UTF-8      (放置编码不一致
unix charset = UTF-8
dos charset = cp936
security = user       (user是要用户验证的 share的话不用验证
passdb backend = tdbsam
#smb passwd file = /etc/samba/smbpasswd
guest ok = no
server string = abc(Samba,Ubuntu)

[duocai]    (共享的目录名称
path = /home/duocai   (共享的路径
comment = shared directory for top1 android
writable = yes
browsable = yes
read only = yes
public = yes
available = yes
valid users = duocai,user1   (进入这个共享目录的 用户
#invalid users = root

[top2]
path = /home/top2
comment = shared directory for top2 android
writable = yes
browseable = yes
read only = no
public = yes
available = yes
valid users = root,user2
#invalid users = root



配置多路径的  可以更改下配置就OK  



# useradd user2

# smbpasswd -a user2

# service smb restart





=================================================================

以下的这个配置是不需要登录验证就OK 

[global]
security = share
guest account = nobody
guest ok = yes
 
[share]
comment = For tmp files, please
path = /home/www
#read only = no
#valid users=root
writeable=yes
public = yes
guest ok = yes
create mask = 1600
#directory mask= 1700
[global]
security = share
guest account = nobody
guest ok = yes
 
[share]
comment = For tmp files, please
path = /home/www
#read only = no
#valid users=root
writeable=yes
public = yes
guest ok = yes
create mask = 1600
#directory mask= 1700

阅读(2419) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~