How to share files using Samba (the more secure way)


Required tools:
– samba
– samba-common
To install:

sudo apt-get install samba
Once the server is install, issue the following command:

sudo gedit /etc/samba/smb.conf
Make the following changes:

workgroup = WORKGROUP


underneath it, add
netbios name = name_of_your_server (no spaces)
For example:

netbios name = kenny_smb_server


Make sure "security" is set to "user".
Scroll down until you see "[homes]", set:

browseable = yes
writable = yes 
Then save the changes.
Finally, create a SMB user, make sure this account exists on your Ubuntu Linux.

sudo smbpasswd -a `whoami`
and set your password
OKAY, you are finished configuring Samba on your Ubuntu Linux.
There are two ways to access it:
Method 1:
My network places > Entire Network > My Windows Network > Workgroup
Method 2:
in the address barm type in "[whatever you named the Samba server]". From my example above, I used "kenny_smb_server".
You should see a folder call "homes", click on it, and it will ask you for your username and password, enter your Ubuntu Login Name and whatever you choose for the password when you used command "smbpasswd". You should be able to take it from here.
Keep in mind that you are sharing, /home/[login name]/*
Install smbfs:

sudo apt-get install smbfs

mkdir Network


sudo mount -t smbfs -o username=[network user],password=[network pass],uid=`whoami`,gid=`whoami`,fmask=000,dmask=000  //[whatever you named the Samba server]/

[network user] /home/`whoami`/NetworkExample:


sudo mount -t smbfs -o username=kenny,password=test,uid=`whoami`,gid=`whoami`,fmask=000,dmask=000  //kenny_smb_server/kenny /home/`whoami`/Network

—- END

Leave a Reply

Your email address will not be published. Required fields are marked *