Linux samba 创建共享盘

2021/10/23 7:11:18

本文主要是介绍Linux samba 创建共享盘,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1.安装samba
sudo apt-get install samba

2.在/home下创建文件夹用以共享
home$ sudo mkdir share
home$ sudo chmod 777 share

3. /etc/samba/smb.conf 编辑smb.conf 文件
[Share]
comment = Shared Folder
path = /home/share
public = yes
writeable = yes
#valid users = friend
create mask = 0700
directory mask = 0700
#force user = nobody
#force group = nogroup
available = yes
browseable = yes
security = user
map to guest = bad user

4.再搜索[global]
在workgroup = workgroup下面增加如下:
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936

5.增加friend账户
sudo useradd friend

为friend设置smb密码
sudo smbpasswd -a friend

6.重启smbd
sudo service smbd restart



这篇关于Linux samba 创建共享盘的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程