Sometimes we would require
files and directories to be accessed and saved across the Network.
Samba
·
On
Computers with Windows Operating systems,
·
it
is very simple, if you are under same WORKGROUP.
·
you
only have to right-click and setup network sharing.
What if you would need to share the files to a Computer with Unix
like Operating Systems ?
It
is more simpler than we would ever think of.
In
this blog, we will see how to setup network folder sharing using Samba.
Samba
·
Samba
is an opensource software suite that provides file and printer sharing services
using SMB/CIFS
·
SMB
(Server Message Block) is a network file sharing protocol from Microsoft.
·
It
is also known as CIFS (Common Internet File System)
Installing
Samba
We
will use Ubuntu Server for our Samba Setup. Let us install the samba server and
its dependencies.
# install using apt-get
apt-get install samba
samba-common python-glade2 system-config-samba
Creating network folder for
sharing
# Lets make a directory to
share via Samba and provide permissions
mkdir -p /home/share
chmod -R 755
/home/share # Provide read,write permissions as
required
chown -R nobody:nogroup /home/share # Change Ownership
for anonymous access (you can also setup authentication)
Configuring
Samba
The Samba configuration file is
located in the path, /etc/samba/smb.conf
# Lets backup the original
Samba configuration file
mv /etc/samba/smb.conf
/etc/samba/smb.conf.bak
Edit the configuration file.
vim /etc/samba/smb.conf
[global]
workgroup =
WORKGROUP #
name of windows domain workgroup, usually WORKGROUP
server string = Samba
Server
netbios name =
samba
security = user
map to guest = bad user
dns proxy = no
# configure your folder here
[Samba]
path = /home/share
browsable =yes
writable = yes
guest ok = yes
read only = no
# The above configuration is a
minimal configuration for sharing a folder across network.
# For the other options, you
can refer to the originial configuration file, you have backed up.
Restart Samba Server
service smbd restart
Accessing network share from a
Windows Computer
Go to Windows, Start–> Run.
Enter ip-address or hostname of samba server
\\172.16.2.100
• The remote folder will
open on windows explorer.
• You will now have access
to the network drive (/home/share) created
• You can also map it as
network drive, so you can access it like a normal folder.
Accessing network share from a Windows Computer
Go to Windows, Start–> Run. Enter ip-address or hostname of
samba server
\\172.16.2.100
•
The remote folder will open on windows explorer.
•
You will now have access to the network drive (/home/share)
created
•
You can also map it as network drive, so you can access it like
a normal folder.

No comments:
Post a Comment