samba服务器搭建,windos无法访问,及访问速度慢等问题

Ubuntu与windows之间交互文件,达到winows查看代码,linux下编译代码的功能,备忘。

1、安装软件

1
2
apt-get install samba
apt-get install samba-common

2、设置共享路径

1
2
mkdir /home/tykj/share
chmod 777 /home/tykj/share

3、修改samb配置文件

1
2
3
4
5
6
7
8
9
10
11
vi /etc/samba/smb.conf

//文末添加
[myshare]
comment=share dir    
path=/home/tykj/share        
browseable=yes
writable=yes

//本文件中寻找并添加
security=share

4、设置samba密码

1
smbpasswd -a tykj (必须是当前系统的一个用户)

5、关闭防火墙

1
ufw disable

6、重启服务

1
service smbd restart

7、重装talloc

如果上述步骤还是不行,则

1
apt-get install libtalloc2

8、设置启用不安全来宾登录

https://jingyan.baidu.com/article/7c6fb428d62a6e80642c90cc.html

运行-gpedit.msc
计算机配置-网络-lanman工作站-启用不安全的来宾登录-已启用

9、windos和Linux文件复制速度慢的问题:

Ubuntu18.04中,将/etc/resolv.conf中的nameserver与/etc/hosts中的loacalhost保持一致,都是127.0.0.1

参考博客:
https://blog.csdn.net/Answer_to_you/article/details/109000345?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

https://blog.csdn.net/pandafxp/article/details/72353282

https://blog.csdn.net/Jack_Baur/article/details/70474063