Linux   发布时间:2022-04-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了树莓派3 Raspberry系统安装samba大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

默认Raspberry不自带samb,需要手动安装。 如果默认的rasp源不好用的话,可以使用下面从网上找的: deb http://mirrors.cqu.edu.cn/Raspbian/raspbian wheezy main contrib non-free rpi deb-src http://mirrors.cqu.edu.cn/Raspbian/raspbian/ wheezy ma

认RaspBerry自带samb,需要手动安装。

如果认的rasp源不好用的话,可以使用下面从网上找的

树莓派3 Raspberry系统安装samba

deb http://@H_628_29@mirrors.cqu.edu.cn/Raspbian/raspbian wheezy main contrib non-free rpi
deb-src http://@H_628_29@mirrors.cqu.edu.cn/Raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://@H_628_29@mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://@H_628_29@mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://@H_628_29@mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://@H_628_29@mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://@H_628_29@mirrorS.Ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://@H_628_29@mirrorS.Ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

树莓派3 Raspberry系统安装samba

直接install samba可能会报错,先把错误提示中版本不对的依赖项卸载掉,比如我的树莓派需要重新安装这几个:

apt-get remove samba-common
apt-get remove libwbclient0

然后正常安装samba,记得不光samba服务,还有管理工具:

apt-get install samba
apt-get install samba-client
apt-get install samba-common
apt-get install samba-common-bin

装完这些基本够用了。

 

 

出处:https://www.cnblogs.com/shijianyujingshen/p/5451139.html

使用 samba 文件共享

共享文件方法很多,其中最常用是 samba ,并且Windows、Linux、Mac 都支持。让树莓派外接大容量移动硬盘,就可以把它作为一个低功耗的 NAS 来用了。
 
首先安装 samba:

sudo apt-get install samba samba-common-bin

 
然后修改@L_801_15@:/etc/samba/smb.conf 。下面的配置是让用户可以访问自己的 home 目录。
1)开启用户认证,找到“##### Authentication #####”,将“#  security = user ”的井号去掉。
2)配置每个用户可以读写自己的 home 目录,在“[homes]”节中,把 “read only = yes” 改为 “read only = no” 。
 
改好后重启 samba 服务:

sudo /etc/init.d/samba restart

 
把系统用户 pi 添加到 samba :

sudo smbpasswd -a pi

现在就可以从其它机器上访问 pi 这个用户的 home 目录了。
 
 
还可以配置一个公共文件区,任何用户都可以访问:

sudo mkdir /home/shares@H_780_197@sudo mkdir /home/shares/public@H_780_197@sudo chown -R root:users /home/shares/public@H_780_197@sudo chmod -R ug=rwx,o=rx /home/shares/public

然后编辑 /etc/samba/smb.conf 文件,在文件的末尾添加

[public]@H_780_197@comment =PublicStorage@H_780_197@path =@H_404_274@/home/shares/public@H_780_197@valid users =@users@H_780_197@force group= users@H_780_197@create mask =0660@H_780_197@directory mask =0771@H_780_197@read only =no

保存文件,并重启 samba 服务。
@H_419_331@

大佬总结

以上是大佬教程为你收集整理的树莓派3 Raspberry系统安装samba全部内容,希望文章能够帮你解决树莓派3 Raspberry系统安装samba所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。