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 share files on Ubuntu 12.10 (Desktop)

Today I will show you how to share files on Ubuntu 12.10.  I will be using the desktop version of Ubuntu 12.10 so this tutorial will not work on the server variant (later tutorials will cover that).


The first thing we need to do is to install the packages we need so open up a terminal and type:

sudo apt-get install samba4

Type your root password when prompted.  Then install cifs-utils by typing:

sudo apt-get install cifs-utils

and then type your root password again.

Now that the required software is installed we can configure it so in your terminal type:

sudo gedit /etc/samba/smb.conf

In the configuration file locate the line WORKROUP = WORKGROUP and change it to the name of your network.  So for instance mine would be changed to WORKGROUP = Home_Network1.

Save the file and exit.

It is now time to add users who will be able to access the shared files and we do this by using the smbpasswd file.  Only users specified in the smbpasswd file will be able to access your samba shares and only users who have users accounts on the system can be added.  In your terminal 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.  If more than one user is allowed to access the share repeat the process.

Now we need to share some files so click Dashboard (top left) and type Samba to open up the file sharing GUI.

 

Click on the Add sign to get the following screen.

Choose which directory you would like to share and give it a share name.  Make sure that you tick both Writable and Visible (shown above).

On the Access tab you can choose which users are able to access the shares.  Click on the user (or users) you added to smbpasswd earlier.

After you do configuration changes in samba you have to restart the service so in a terminal type:

sudo service samba4 restart

Now we have to check the all the configuration files so in your 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.151 (where 10.0.0.151 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.

How to connect to your shared files 

On Linux Clients:

Install samba and cifs-utils 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 Home_Network1).

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. To mount the shares at boot you will need to add the following line to /etc/fstab

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

On Windows Clients:

We have to change the workgroup to Home_Network1 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.

 

 

 

 

 

 

Cups Server Error ‘client-error-not-possible’


I came across this little beauty yesterday when trying to install a network printer on an Eeepc 701 8G running Lubuntu (really good distro by the way!!).  The netbook could see the printer but was unable to install the driver.

The steps I took to rectify the problem were:

1. I thought it was a driver issue so I reinstalled the hp linux drivers.  This made no difference.

2. I reinstalled CUPS.  Again this made no difference.

3. I then remembered that the printer was shared through Samba.  I had already installed samba onto the Eeepc but I hadn’t installed smbclient. Doh!!  I installed this and the world is good again.

I hope this helps out someone else.

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support and Computer repairs to both personal and business 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 my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

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

File sharing on Linux


The following tutorial will show you how to set up samba on a Linux system allowing you to share files and folders with a either a Linux or a Windows client.  All the following steps work on Linux Mint 11 but should also work on any other distribution using gnome.  For kde the only thing which differs is defining shares (usually through the kde control center).

On the Samba Server

First thing is to check samba is installed.  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.

Now open up your smb.conf file by typing:

gksu gedit /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 = MINT_HOME.  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 as root and type:

smbpasswd -a user (where user is the name of the person allowed to access the shares).  When prompted enter their new password twice.

Next we have to define the samba shares.  Type:

sudo shares-admin

With the GUI open add your samba shares, save and exit.

Note, everytime you update the smb.conf file you must restart the samba service so type:

sudo service smbd restart

Now we have to check the configuration so far.  Type:

testparm

If there are errors in the xorg.conf file testparm will tell you.  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 smbclient and smbfs either using the package manager or apt-get install.  Now 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 MINT_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

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business 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 my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

Mounting network shares in Linux

Today we are going to learn how to mount network shares using Linux.  There are two ways to do this, either manually or using the fstab file, and we shall cover both.  For this tutorial we will use the following:

Network share at 192.168.1.3/mnt/MyDisk1 which is mounted on a FreeNAS system (nfs)

Network share at 192.168.1.2/share which is on a Linux Mint 16 file server (samba)

Both shares will be accessed from a laptop running Linux Mint 16.


Manually

Lets take the FreeNAS nfs share first.  First thing to do is install the nfs package nfs-common.  Open up a terminal and type:

sudo apt-get install nfs-common

Enter your password when required.  Next thing type:

mount 192.168.1.3:/mnt/MyDisk1 /media/dev/MyDisk1

where:

192.168.1.3 is the ip address of the system where the share is mounted

/media/dev/MyDisk1 is the mount point where you want the share to be mounted

Now lets take a look at the Linux Mint 16 samba share.  Again we need to install the required samba packages so open up a terminal and type:

sudo apt-get install samba

Next type:

mount -t cifs //192.168.1.2/share /mnt -o username=user,password=pass

where:

user and pass are your login details

/mnt is the mount point on the local system

Using FStab

In a terminal type:

sudo nano /etc/fstab 

Add one of the following lines to the file depending on if you are using samba or nfs.

192.168.1.3:/mnt/MyDisk1 /media/dev/MyDisk1 nfs hard,intr 0 0 (NFS)

//192.168.1.2/share /media/dev2/Share cifs username=user,password=pass,user,rw,noatime 0 0 (SAMBA)

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