centos7.5系统下进行
chkconfig iptables off
systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i '7c SELINUX=disabled' /etc/selinux/config
yum install -y net-tools
yum -y install samba samba-client
systemctl start smb nmb
ps -ef | grep -E 'smb|nmb'
netstat -tunlp | grep -E 'smbd|nmbd'
mkdir /mnt/data
useradd -s /sbin/nologin mt
cat /etc/passwd | grep mt
smbpasswd -a mt
[输入两遍密码123456]
chown mt.mt /mnt/data
chmod -R 777 /mnt/data
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vim /etc/samba/smb.conf
[global] workgroup = WORKGROUP server string = Samba Server Version %v [mtdata] comment = mtdata path = /mnt/data/ public = no admin users = mt valid users = @mt browseable = yes writable = yes create mask = 0777 directory mask = 0777 force directory mode = 0777 force create mode = 0777
systemctl restart smb nmb
使用testparm –v命令可以详细的列出smb.conf支持的配置参数,回头我起篇新的文章专门写写samba的这些参数吧!
windows端可能需要执行的命令
net use * /delete /y