1.更新当前软件。

sudo apt-get upgrade
sudo apt-get update
sudo apt-get dist-upgrade

2.安装samba服务器。
sudo apt-get install samba samba-common

3.添加用户(下面的zhongshan是我的用户名,之后会需要设置samba的密码)。
sudo smbpasswd -a zhongshan

4.配置samba的配置文件。
sudo vim /etc/samba/smb.conf
在配置文件smb.conf的最后添加下面的内容:

[zhongshan]
comment = zhongshan
browseable = yes
path = /home/zhongshan
create mask = 0700
directory mask = 0700
valid users = zhongshan
force user = zhongshan
force group = zhongshan
public = yes
available = yes
writable = yes


5.重启samba服务器。(注:每次配置完,必须重启samba服务)
sudo service smbd restart

 

参考https://www.cnblogs.com/tansuoxinweilai/p/11617419.html

相关文章:

  • 2021-09-23
  • 2021-09-07
  • 2021-08-16
  • 2021-12-11
  • 2021-11-18
  • 2021-09-23
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-11-22
  • 2021-12-14
  • 2021-06-14
  • 2021-08-15
相关资源
相似解决方案