Linux Samba Practice

本文详细介绍如何在Ubuntu平台上安装和配置Samba服务,包括创建共享文件夹、修改配置文件、启动服务及测试等步骤,并提供了在Raspberry Pi上的具体配置指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Samba Linux Server

Platform: Ubuntu

Steps:

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

  • Create Share Folder
yubao@yubao-ThinkPad-E560:~$ mkdir SambaShare
yubao@yubao-ThinkPad-E560:~$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

yubao@yubao-ThinkPad-E560:~/SambaShare$ /etc/init.d/smbd start
[ ok ] Starting smbd (via systemctl): smbd.service.
yubao@yubao-ThinkPad-E560:~/SambaShare$ testparm

Add User to Samba

yubao@yubao-ThinkPad-E560:~/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


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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值