Linux中开启samba

更新与安装

1
2
3
apt update
apt upgrade -y
apt install nano samba -y

配置

切换目录到/etc/samba,编辑配置文件nano smb.conf,在文件的最后添加

1
2
3
4
5
6
[datacenter]
comment = 描述
path = /路径
guest ok = no ;或yes
browsable = no ;或yes
;write list = root

保存后添加账户smbpasswd -a root输入新的密码,然后重启服务

1
2
3
systemctl restart smdb
systemctl restart samba
systemctl enable --now smbd

添加新账号

1
2
3
useradd user1

smbpasswd -a user1

Linux中开启samba
https://oujun.work/2023/06/30/Linux中开启samba.html
作者
欧俊
发布于
2023年6月30日
许可协议