1. 更新apt-get包管理器:
sudo apt-get update
  1. 安装samba:
sudo apt-get install samba
  1. 配置samba:

在/etc/samba/smb.conf文件中进行配置。可以使用nano编辑器来打开该文件:

sudo nano /etc/samba/smb.conf

在文件末尾添加以下内容:

[share]
comment = Shared Folder
path = /path/to/folder
read only = no
browsable = yes

其中,share是共享文件夹的名称,comment是注释,path是共享文件夹的路径,read only表示只读,browsable表示是否可浏览。

  1. 创建samba用户:
sudo smbpasswd -a username

其中,username是要创建的用户的用户名。

  1. 重启samba服务:
sudo systemctl restart smbd

现在,你可以通过其他计算机上的文件管理器访问共享文件夹。在文件管理器中,输入以下地址:

smb://ip_address/share

其中,ip_address是debian计算机的IP地址,share是共享文件夹的名称。输入samba用户的用户名和密码即可访问共享文件夹。

debian安装samba

原文地址: http://www.cveoy.top/t/topic/bSV6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录