1.安装服务
apt install samba smbclient -y
2.配置文件
vim /etc/samba/smb.conf
'''
[share]
comment = shared folder
browseable = yes
path = /opt/share
create mode = 0775
directory mode = 0700
valid user = storage
force user = storage
force group = storage
public = yes
available = yes
writeable = yes
'''
3.创建samba目录与用户
- 创建目录
mkdir /opt/share
- 创建用户
useradd storage
4.设置samba账号
smbpasswd -a storage
5.重启服务
/etc/init.d/samba-ad-dc restart
标签:samba,force,storage,share,Ubuntu,yes,搭建
From: https://www.cnblogs.com/wsxier/p/17031238.html