How to share files on Debian Wheezy 7.0


I love Debian.  It is very stable and works great as a server, especially a file server, so today I will show you how to share files on Debian Wheezy.

Before we do anything you first have to set a static ip address on your server and this tutorial will show you how. Now we need to install some packages. The first one is samba so open up your terminal and type:

sudo apt-get install samba

Next we need the cifs-utils package so again in your terminal type:

sudo apt-get install cifs-utils

Now we need to configure samba and for that we need the smb.conf file.  In your terminal type:

sudo nano /etc/samba/smb.conf

I am using nano but you can use any text editor you choose.

Locate the line workgroup=WORKGROUP and modify it to use the name of your network. For example mine would be:

workgroup=Home_Network01

Now we need to add the network share so scroll down to the bottom of the file and add the following text:

[Shared_Files] – This is the name of your network share

path = home/chris/Shared_Files (change this to the location of your network share)

available = yes

browsable = yes

public = yes

writable = yes

comment =shared files

Now save the file and exit.

We now need to add users to the smbpasswd file.  Only users specified in this file will be allowed to access your samba shares. In your terminal type:

sudo smbpasswd -a user (where user is the person allowed to access the shares)

Where prompted enter a password for them twice.  Please note that for a user to be entered into the smbpasswd file they have to have user accounts on the server itself.

Once that is done we need to restart the samba service so again in your terminal type:

sudo service samba restart

As a final check type:

testparm

If there are any configuration errors then testparm will show them to you. If everything is configured correctly you can check the status of your shares by typing:

smbclient -L 10.0.0.1 (where 10.0.0.1 is the ip address of your file server)

All you have to do now is map the drive to your Linux or Windows clients to get access to your files.

About the Author

P1020114

Hi I am Chris Wakefield the owner of ComTech IT Support. I provide Windows and Linux based IT Support, laptop repairs and computer repairs to both business and personal clients in and around Stirling.

For a list of what I can offer you why not visit my website www.comtech247.net where you will find a list of my services, testimonials, blog and much more!!

 

 

 

 

 

 

 

This entry was posted in Blog and tagged debian, file sharing, samba, wheezy. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

60,976 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>