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