ComTech: IT Support Stirling
TwitterFacebookGoogle

How to share files on Debian Wheezy


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’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

 

 

How to configure file sharing on Debian 6.0

Recently I have changed over my main server to Debian 6.0 running the LXDE desktop.  I have a requirement to share my main files across the network to both Windows and Linux machines and because of this I will be using Samba.

The steps outlined in this tutorial should work if you have a desktop environment installed (in my case LXDE) or not.

First thing we need to do is set a static ip address for our server.  Once we have that setup it is time to download and install the packages we need – smbfs, samba and smbclient.

Open up a terminal and type:

sudo apt-get install samba

Type your root password when prompted.  You will be asked to provide a Workgroup name during installation.

Now install smbfs by typing:

sudo apt-get install smbfs

and then type your root password again.


Finally install smbclient by typing:

sudo apt-get install smbclient

We now have to configure the smb.conf file which contains all the samba settings. In a terminal type:

sudo nano /etc/samba/smb.conf

Locate the line WORKROUP = ********* and check that it is set to the name you entered when installing samba (Mine was set to HomeServer_01).

Now at the end of the file add the following text:

[Shared_Files] (This is the name of your share – change as appropriate)
path = /home/chris (This is the network path to your share – change as appropriate)
available = yes
browsable = yes
public = yes
writable = yes
comment = shared files

Save the file and exit.

Now we have to add users to the smbpasswd file which is located at /etc/samba/smbpasswd. Only users specified in the smbpasswd file will be able to access your samba shares.  Open a terminal and type:

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

When prompted enter their new password twice.

We now need to restart the samba service so in a terminal type:

sudo service samba restart

Now we have to check the configuration so far.  In a terminal type:

testparm

Testparm will tell you if there are any errors in your configuration.  If everything is Ok then type:

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

This will show you the list of all your available samba shares.  At this point if you have no errors your server is configured correctly.

Linux Clients

Install samba and smbfs either using the package manager or the command line.  You will need to set the Workgroup parameter in the smb.conf file to the same value as you entered on the server (in my case HomeServer_01).

Then we have to mount the available shares.  First decide where you are going to mount them.  I will mount them in /media/dev/share but first I will have to make the directory dev so:

cd /media

sudo mkdir dev

and then ls which should show us the new dev directory in media.  Now time to mount the shares.

sudo mount -t smbfs //10.0.0.1/(share name) /media/dev/share where 10.0.0.1 is the ip address of your samba server.  This will mount the share but only as long as you are logged in.  To make the link persistent you need to enter the following line into /etc/fstab.

//10.0.0.1/(share)   /media/dev/share      cifs       username=user,password=pass,user,rw,noatime     0              0

Windows Clients

We have to change the workgroup to the same value as the Debian server (Home Server_01 in this case) and then add the ip address of the samba server to the hosts file (must open as administrator).

Once this is complete map the shares to your computer.

Word of warning here about firewalls.  Either turn them off or add exception rules for traffic on ports 137-139 and 445.

About the Author

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.

How to set up file sharing on Small Business Server 2011

Today I will show you how to set up file sharing on Small Business Server 2011.

On your desktop double click on Dashboard and then click on Server Folders and Hard Drives to get the following screenshot.

Small Business Server 2011 comes with three folders by default. Client Computer Backups is the folder where all the client backups are stored. The Company folder is where the employer will have their shared data while the Users folder will be used for individuals to store their files.

You can’t set permissions for the Client Computer Backup folder so lets take the Company Folder first. Highlight the Company Folder and then click View the Folder Properties (right side of screen).  Once the properties box appears click on the Sharing Tab.


You can set permissions for Admin, User (in general) or Individual users.  You can set User and Individual Users permissions as Read, Read / Write or No Access.  Choose the permissions required by your individual company and then click Apply.

Now lets take Users.  Double Click Users to view all user folders on the system.

Now pick a user (I will choose christopherwakefield) and right click and go to Properties.

When the properties box appears go to Share. Type the name of the user in the search box and click Add.

Now click on the permissions for christopherwakefield (your user) under Permission Level and set the permissions required by your company.  When they are set click Share. The folder is now shared.

About the Author

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.

How to configure file sharing on Ubuntu 12.04 LTS


Today I will show you how to configure file sharing on Ubuntu 12.04 LTS.  This tutorial works for both the desktop and server variations.

First thing is to install the packages we need – Samba and smbfs. So open up a terminal and type:

sudo apt-get install samba

Type your root password when prompted.  Then install smbfs by typing:

sudo apt-get install smbfs

and then type your root password again.

We now have to configure the smb.conf file which contains all the samba settings. In a terminal type:

gksu nano /etc/samba/smb.conf

Locate the line WORKROUP = WORKGROUP and change it to the name of your network.  So for instance mine would be changed to WORKGROUP = Ubuntu_home.

Now at the end of the file add the following text:

[sdc] (This is the name of your share – change as appropriate)
path = /media/dev/sdc (This is the network path to your share – change as appropriate)
available = yes
browsable = yes
public = yes
writable = yes
comment = shared files

Save the file and exit.

If you prefer GUI’s (Desktop Ubuntu only) then you can install the Samba gui instead and share your folders that way.

Now we have to add users to the smbpasswd file which is located at /etc/samba/smbpasswd.  Only users specified in the smbpasswd file will be able to access your samba shares.  Open a terminal and type:

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

When prompted enter their new password twice.

We now need to restart the samba service so in a terminal type:

sudo service smbd restart

Now we have to check the configuration so far.  In a terminal type:

testparm

Testparm will tell you if there are any errors in your configuration.  If everything is Ok then type:

smbclient -L 192.168.1.10 (where 192.168.1.10 is the ip address of your samba server).

This will show you the list of all your available samba shares.  At this point if you have no errors your server is configured correctly.

Linux Clients

Install samba and smbfs either using the package manager or the terminal.  We need to edit the Workgroup field in smb.conf to the name of your network (e.g Ubuntu_home).

Then we have to mount the available shares.  First decide where you are going to mount them.  I will mount them in /media/dev/share but first I will have to make the directory dev so:

cd /media

sudo mkdir dev

and then ls which should show us the new dev directory in media.  Now time to mount the shares.

sudo mount -t smbfs //192.168.1.10/(share name) /media/dev/share where 192.168.1.10 is the ip address of your samba server.  This will mount the share but only as long as you are logged in.  To make the link persistent you need to enter the following line into /etc/fstab.

//192.168.1.10/(share)   /media/dev/share      cifs       username=user,password=pass,user,rw,noatime     0              0

Windows Clients

We have to change the workgroup to Ubuntu_home and then add the ip address of the samba server to the hosts file (must open as administrator).

Once this is complete map the shares to your computer.

Word of warning here about firewalls.  Either turn them off or add exception rules for traffic on ports 137-139 and 445.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

CyberChimps
Follow

Get every new post delivered to your Inbox

Join other followers

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera
WP Like Button Plugin by Free WordPress Templates