Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10475793
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:19:35

Samba文件共享应用
 
 [root@localhost ]#rpm -qa | grep samba          检查Samba软件包
samba-3.0.23c-2
 
[root@localhost samba]#service smb restart               重启Samba服务
关闭 SMB 服务:                                            [确定]
关闭 NMB 服务:                                           [确定]
启动 SMB 服务:                                            [确定]
启动 NMB 服务:                                           [确定]

[root@localhost samba]# vi   etc/services             
检查/etc/services文件netbios-开头记录是否被注释
netbios-ns 137/tcp                      # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp                   # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp                     # NETBIOS session service
netbios-ssn 139/udp
 
[root@localhost samba]# vi  smbusers                 添加Windows映射账户
# Unix_name = SMB_name1 SMB_nam2 ...
root = administrator admin
nobody = guest pcguest smbguest
 
[root@localhost samba]# vi smb.conf        编辑smb.conf配置文件
 
workgroup = Workgroup             // 工作组名称
server string = Samba Server Version %v
hosts allow = 172.16.0. 172.16.1.254.       // IP访问限制
max log size = 50
security = user             // 共享安全级别
passdb backend = tdbsam
# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
 
 load printers = yes
 cups options = raw
#============================ Share Definitions ==========================
[printers]   // 打印机共享
     comment = All Printers
     path = /var/spool/samba
     browseable = yes
     guest ok = yes
     writable = yes
     printable = yes
[abcd]    // 添加共享文件夹
     comment = this is pubfile
     path = /abcd
     writable = yes
     browseable = yes
    read list = root 
     write list = @root
 
阅读(736) | 评论(0) | 转发(0) |
0

上一篇:linux 充电

下一篇:安装openssh出现的问题

给主人留下些什么吧!~~