欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux Samba Practice

程序员文章站 2022-05-17 18:14:04
...

Samba Linux Server

Platform: Ubuntu

Steps:

  • Install Samba
 sudo apt-get install samba samba-common-bin

  • 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 samba
sudo smbpasswd -a pi

Access samba files from windows OS:

\\[Raspberry_ip]\pi

Linux Samba Practice

Note: 

    Use  "ping RASPBERRYPI"     to obtain the Raspberry Pi IP address when 'samba' service is running.

Reference:

  1. Configure Samba for Raspberry Pi, http://www.waveshare.net/study/portal.php?mod=view&aid=599




相关标签: Samba