Linux Samba Practice
程序员文章站
2022-05-17 18:14:04
...
Samba Linux Server
Platform: Ubuntu
Steps:
- Install Samba
- Create Share Folder
aaa@qq.com:~$ mkdir SambaShare
aaa@qq.com:~$sudo chmod 777 SambaShare/
- Modify Configure File
sudo emacs -nw /etc/samba/smb.conf
Add:
[share]
comment = share for users
path = /home/yubao/SambaShare
browseable = yes
writable = yes
public = no
Start Samba Service and Test Config Parameters
aaa@qq.com:~/SambaShare$ /etc/init.d/smbd start
[ ok ] Starting smbd (via systemctl): smbd.service.
aaa@qq.com:~/SambaShare$ testparm
Add User to Samba
aaa@qq.com:~/SambaShare$ sudo smbpasswd -a yubao
[sudo] password for yubao:
New SMB password:
Retype new SMB password:
Added user yubao.
Test on Windows:
\\[linux_ip]
Input username and password
Configure Samba for Raspberry Pi
Modify 'home' group in 'smb.conf' file
sudo vi /etc/samba/smb.conf
read only = no
Add user 'pi' to Samba:sudo smbpasswd -a pi
Set password for 'pi' to access sambasudo smbpasswd -a pi
Access samba files from windows OS:
\\[Raspberry_ip]\pi
Note:
Use "ping RASPBERRYPI" to obtain the Raspberry Pi IP address when 'samba' service is running.
Reference:
- Configure Samba for Raspberry Pi, http://www.waveshare.net/study/portal.php?mod=view&aid=599
上一篇: Nginx(一)——服务部署
推荐阅读