ICT
 
 
home search Contact
Lmarsden is a non-profit information site

File services - on the networks

Samba is an open-source software suite that runs on Unix/Linux based platforms but is able to communicate with Windows clients like a native application. So Samba is able to provide this service by employing the Common Internet File System (CIFS). At the heart of this CIFS is the Server Message Block (SMB) protocol.  Samba does this by performing these 4 key things -

  • File & print services

  • Authentication and Authorization

  • Name resolution

  • Service announcement (browsing)


Samba can be run on many different platforms including Linux, Unix, OpenVMS and operating systems other than Windows and allows the user to interact with a Windows client or server natively. It can basically be described as the Standard Windows interoperability suite of programs for Linux and Unix.

 

Setup samba

We install the samba package from the terminal in Ubuntu with the following code -

sudo apt-get update

sudo apt-get install samba

Make a backup of the configuration file before editing

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old

Open the conf file and make the following changes -

sudo nano /etc/samba/smb.conf

Use command K and delete all lines of code Add the following at the end of the file to enable sharing -

[global]
netbios name = LAMP001
server string = The Pi File Center
workgroup = WORKGROUP

[www_website]
path = /var/www/html
comment = No comment
browsable = Yes
writeable = Yes
create mask = 0777
directory mask = 0777
public = no

 

Notes:

netbios name = name that people will see on the network (LAMP001)

path = /var/www/html - this is the default folder you will see (root tree)

[www_website] - this is the root folder visible name on your mac when connected.

 

Change the SMBD password (network password) to the same as the RPi

sudo smbpasswd -a pi

pw = raspberry

confirm password = raspberry

 

Restart smbd service:

sudo service smbd restart

or

sudo /etc/init.d/samba restart

 

Create write access to the folder

sudo chmod -R 777 /var/www


You can now access your RPi over the network


Tutorial 01: Accessing your LAMP:




 

Focus Point

 

 

Information