Michael_Tong
近期目标:按时吃药,努力做个正常人。

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

posted on 2018-11-25 03:00  Michael_Tong唐唐  阅读(506)  评论(0编辑  收藏  举报