实现过程:
1.配置文件设置
2.创建myshare路径目录,给予权限
3.测试访问
4.共享目录下创建文件hello.c
5.linux中查看文件
1.配置文件设置(红色为添加内容)
# 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
map to guest =Bad User
[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 = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[myshare] ##共享目录名字为myshare
path=/opt/abc ##创建目录
public=yes ##允许匿名访问
browseable=yes
writable=yes
create mask=0644
dirextory mask=0755
2.创建myshare路径目录,给予权限
3.测试访问
先查询ip
windows上输入\\192.168.242.141
4.共享目录下创建文件hello.c
5.linux中查看文件