fuzidage
专注嵌入式、linux驱动 、arm裸机研究

导航

 

安装服务

sudo apt-get install samba samba-common

关闭防火墙

sudo systemctl stop ufw

添加用户book

 

 sudo smbpasswd -a book

配置samba

 sudo vim /etc/samba/smb.conf

[book_share_samba_dir]

        comment = share samba dir

        path = /home/book/ftp

        valid users = book

        force user = book

        force group = book

        creat mask = 0644

        directory mask = 0755

        browseable= yes

        available = yes

        public = yes

        read only = no

        writeable = yes

重启服务

sudo service smbd restart

~$ sudo /etc/init.d/smbd restart

~$ /etc/init.d/smbd restart

效果:

 注意不能用NAT虚拟网络ip访问samba,要用桥接网络ip. 不过ssh可以两种方式访问。

常见问题:

samba不允许一个用户使用一个以上用户名与一个服务器或共享资源的多重连接

因此需要windows进入cmd

可以windows cmd下用 net use 命令查看下当前的共享访问到底有没有它。

有的话,net use * /del /y

 

重新映射网络驱动器即可

 

 

Network error: Software caused connection abort

ssh连接后,过一段时间自动断开,报错Network error: Software caused connection abort?

修改/etc/ssh/sshd_config:

修改如下2个地方:

  TCPKeepAlive yes

  LoginGraceTime 0

 
posted on 2022-09-14 20:50  fuzidage  阅读(46)  评论(0编辑  收藏  举报