四、配置共享目录
sudo vi /etc/samba/smb.conf
在文件尾追加以下内容
[share]
path = /data/home/t_route/
available = yes
valid users = root
read only = no
browsable = yes
public = yes
writable = yes
share:外部访问的目录名
path:linux上需要共享的目录
valid users:添加的账户名
五、重启smbd服务
service smb restart
六、访问共享目录
cmd 输入 //linuxip/共享目录名
//192.168.0.140/share


/etc/samba/smb.conf 配置文件如下:
See smb.conf.example for a more detailed config file or
read the smb.conf manpage.
Run ‘testparm’ to verify the config is correct after
you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable 《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】 = No
[print$]
comment = Printer Drivers
这篇博客详细介绍了如何在Linux系统中配置共享目录,以便通过Windows进行访问。步骤包括编辑`smb.conf`文件,设定共享路径和权限,重启smbd服务,以及在Windows的CMD中输入特定命令来访问共享目录。

4974

被折叠的 条评论
为什么被折叠?



