Chapter 9. Tutorials & tips

Table of Contents
Network sharing
Security
Thin client
Linutop OS as server

Network sharing

Accessing Windows™ shares

Access to Windows™ shared folders can be done in several ways.

With the terminal

To share server folder files in your Linutop system, follow its steps in a terminal on your Linutop OS :

Create a folder to share (if you haven't already done so) using the following command:

 $ mkdir /home/linutop/share

[With login] Mount a shared folder using the following command:

 $ sudo mount -t cifs //IP_SERVER/SHARE_FILE /home/linutop/share -o \
    username=yout_username,password=your_password,vers=3.0,iocharset=utf8 

[Anonymous/Without login] Montez un dossier partagé en utilisant la commande suivante :

 $ sudo mount -t cifs //IP_SERVER/SHARE_FILE /home/linutop/share -o \
    guest,vers=3.0,iocharset=utf8

Example :

 $ sudo mount -t cifs "//nas-server.local/shared_folder/Photos" /mnt/nas/ \
    -o guest,vers=3.0,iocharset=utf8

If you want to unmount the shared folder, use the following command:

 $ sudo umount /home/linutop/share

Browse with Thunar File Manager

Open your home directory by double-clicking the Documents icon on the desktop. In the panel, select the menu Network .

Share folders from the Linutop OS

This section explains how to set up folder sharing on Linutop OS using Samba, enabling simple and secure network access to shared files.

Installing Samba:

$ sudo apt-get update
sudo apt-get install samba

Copy a copy of the default Samba configuration file :

$ cp /etc/samba/smb.conf /etc/samba/smb.conf.org

Be sure to create a shared directory in the location of your choice if this hasn't already been done, and make sure you've set :

$ sudo mkdir -p ~/share && sudo chmod 077 ~/share

Edit file smb.conf :

$ sudo gedit /etc/samba/smb.conf

Remember to uncomment the # or ; dans smb.conf smb.conf :

interfaces = 127.0.0.0/8 eth0 # Remember to change ethX to wlanX if you use WiFi
bind interfaces only = yes 

Add and copy the following section at the end of the file:

[Share]
comment = Samba sharing on Raspberry Pi
path = /home/pi/partage
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
share modes = yes

  • comment: this is a brief description of the sharing folder. Adapt it to your needs.
  • path : this is the location of the folder to be shared. This example uses /home/pi/share
  • writable : users will be able to write
  • guest ok : allows clients to connect to the shared directory without providing a password
  • 0777 when a file/folder is created, the rights applied allow anyone to read or write (with mask you'll have rwxrw-rw- on a created file and rwxrwxrwx on a created directory).

Restart the Samba service :

 $ sudo service smbd restart
sudo service nmbd restart

To access the Samba share from another computer, open the File Manager and enter the following address in the address bar:

 smb://IP_DU_SERVEUR/share

Caution

Replace IP_SERVER by the IP address of your Raspberry Pi.