Samba – Raspberry Pi, Cubieboard, Banana Pi, Linux, Windows, Raspbian, Cubian

I wanted to share storage on my cubieboard through samba. You can use this tutorial for other storage media. For example SD card, HDD, Flash disk or something else. You can share only one file too. This tutorial can be used for other operating systems as raspbian, cubian, debian, ubuntu or other distribution of linux. These systems running in the Raspberry Pi, Cubieboard, Banana Pi or other devices.

If you want to share only one file, the process is easier. I wanted to share partition of SD card. I needed GParted for partition of SD card. Shared partition is FAT32 system.

into /etc/fstab write (for a new partition):

dev/mmcblk0p3 /mnt/SharedFile auto defaults 0 2

E.g.:

We did automatic mount of this partition after start of system (If you want to share USB, you have to use /dev/sda or something else. You can find of name of storage media via sudo -f /var/log/messages or sudo fdisk -l)

E.g.:

then, we create a file: sudo mkdir /mnt/SharedFile

instalation of samba:

sudo apt-get install samba samba-common-bin

we modify smb.conf:
sudo mcedit /etc/samba/smb.conf

write to the smb.conf – at the last line (e.g.):
[name]

coment = comemnt

read only = no

locking = no

#shared file

path = /mnt/SharedFile/

#allow user – USER

valid users = USER

guest ok = no

create mask 777

dir mask 777

#list of allow IP address

hosts allow = xxx.xxx.xxx.xxx

#other IP address are forbidden

hosts deny = 0.0.0.0/0

E.g.:

add USER to samba:
sudo smbpasswd -a USER

If we want to create user specially for samba:
sudo useradd -m UserName

-m is command for making file in the /home

then, we add user to samba (as I mentioned)

at the end -> reboot system:
sudo service samba restart

or
sudo /etc/init.d/samba restart

Now, you can log in from your computer

Open Computer. MAP NETWORK DRIVE.

E.g.:

fill in the full path to the file on the server

E.g.:

Fill in username and password and then you will see:

E.g:

And left panel too:

E.g:

Sources: http://www.linuxsoft.cz/article.php?id_article=1950

Share the article:
Show your
Maker soul!
Buy a T-Shirt
Coffee for Chiptron
Give a boost to the next article

Related Articles

I would like to tell you that I’m not prefessional in security, but i would like to show you article about basic security of linux server. Sources for this article is my own experinces and literature search. With distribution of…

Cloud services are very popular and the offer is big. Not all your data you want to save on thirt-party servers. So, then you can use own cloud service on your server. This tutorial will be working on Banana Pi…

CubieTech released a new version of popular single-board computer called CubieBoard6. What we can find on CubieBoard 6? The processor is Actions Semi S500 (quad-core ARM Cortex A9) with GPU Imagination PowerVR SGX544. It is contains USB 3.0 interface which…

The single-board computer called Banana Pi M2 Berry is other device by SinoVoip company. The interesting price $34 (with shipping $39.66 in my case) of Banana Pi M2 Berry looks like alternative to Raspberry Pi 3, Orange Pi Prime ?i…

Other articles about single-board computer called Banana Pi M2 Berry by SinoVoip. In this article, we check SATA connection and we test the speed of communication. Other articles about BananaPi M2 Berry: Banana Pi M2 Berry: first start, iperf, sysbench…

3D printing is very popular, available and cheap opportunity how to make a lot of cases specialy for your needs. You can make your own NAS or media centre with single-board computers like Raspberry Pi, Orange Pi or Banana Pi.…

Trends