Sharing File/Folder with Samba on Linux

December 31, 2016 | Views: 4216

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Sharing Files/Folders with Samba on Linux

First you should install the samba module with using command line;

#apt-get install samba

Then, create a folder,has everyone (read-write) authorisation, on desktop

#cd Desktop

#mkdir -p “folder_name”

#chmod 777 “folder_name”

1

Then, open samba config folder and add these commands;

#vi /etc/samba/smb.conf

[test$] comment = Sharing folder
path = /root/Desktop/test
browseable = yes
guest ok = yes
read only = yes
public = yes
writable = yes

2

After making all changes on folder, we can start the samba service

#service samba start

Now, when the running “\”IP_address_of_Linux”test$ ” command any computer on the same network, it will be accessed the “test” folder on Linux machine.

3

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
5 Comments
  1. this is not a complete guide.

  2. Wouldn’t it be better to create Users and remove the rw flag on Others? Also, you are creating the shared folder as root, this means the permission on the folder is root:root. Sure it won’t create issue with Windows users? And a Windows user that will create a file inside this folder, what permissions will have the file and which group?
    I don’t know.. it is easy to type 3 command and have Samba working, but it won’t work properly.

    I created this http://pastebin.com/HKw3X2Qb for you because I can not post it in the comments due to codes in it. Have a look 😉

  3. how can i see the ip adress of other computers in the same wifi. Im using windows. answer please

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel