samba服务
#网卡配置设置为如下所示即可,删掉70文件(两台机器均执行)
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
#服务器
#查看是否安装了samba服务 ,否则安装
rpm -qa samba
#开启smb服务
service smb start
#切换至samba服务配置文件所在的主目录,smb.conf是该服务的主配置文件
cd /etc/samba/
ls
#编辑主配置文件,下为修改位置,其余不动
vim smb.conf
###
workgroup = testgroup
server string = Samba share file
security = share
;[homes] ###在其前面加上;
; comment = Home Directories
; browseable = no
; writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
;[printers]
; comment = All Printers
; path = /var/spool/samba
; browseable = no
; guest ok = no
; writable = no
; printable = yes
[test]
comment = share file
path = /sambafile
browseable= yes
guest ok= yes
writable = yes
public= yes
#进入根目录,创建共享文件/sambafile
cd /
mkdir /sambafile
#更改完后关闭防火墙等服务(两台机器均执行)
service iptables stop
getenforce
setenforce 0
#重启smb服务
service smb restart
#客户机
通过smb共享文件
smbclient -L \\192.168.8.129
Enter root's password: ###直接回车即可