1分钟
SAMBA 服务器端
目前已存在的SAMBA用户
配置文件中加上此行,指定配置目录
vim etc/samba/sam.conf
global
config file = /etc/samba/conf.d/%U
创建SAMBA共享目录和测试文件
mkdir /data/smb2
mkdir /data/smb3
touch /data/smb2/test2
touch /data/smb3/test3
创建SAMBA配置目录
mkdir /etc/samba/conf.d/
cd /etc/samba/conf.d/
vim smb2
share
path=/data/smb2
writeable=yes
vim smb3
share
path=/data/smb3
给data目录添加777权限
chmod -R 777 /data/
重启smb服务
systemct restart smb
测试:
使用samb2用户登录,共享目录为/data/smb2
smbclient //192.168.30.7/share -U smb2%centos
使用samb2用户登录,共享目录为/data/smb3
smbclient //192.168.30.7/share -U smb3%centos
学员评价