1:yum装置samba和samba-client
yum -y install samba samba-client
2:设置samba用户名和明码
(本文应用用户名:root)
#touch /etc/samba/smbpasswd
#smbpasswd -a root
输出root的明码
3:批改samba的配置文件
#vi /etc/samba/smb.conf
增加内容如下:
[root]
comment = root
path = /root
browseable = yes
writable = yes
4:测试配置文件是否正确
#testparm -v
5:设置samba开机启动
#chkconfig smb on
6:设置selinux不启动
#vim /etc/sysconfig/selinux
修enforcing改为disable
SELINUX=enforcing 改为 SELINUX=disabled
7:禁止firewall自启动
#systemctl disable firewalld.service
8:测试samba查看目录
#ifconfig 查问ip地址
依据IP地址应用\\ip 进行拜访测试
9:smb服务治理命令
systemctl stop smb
systemctl start smb
systemctl status smb
发表回复