-   Linux - Newbie (
-   -   Samba Shares (

oakridge 01-02-2012 11:25 AM

Samba Shares
I have recently moved to Ubuntu - see my introduction in the new members section 'Hello from Yorkshire'.

I am hoping to use Ubuntu as a file server for our home office, as Mandriva was before, but I am having some trouble getting Linux and the Windows machines to talk to each other.

pyNeighbourhoud finds the four PCs turned on at present, including the Linux but only finds the shares on two of them, including the Linux. Windows finds all shares.

The 'Home' window finds Windows Network/Workgroup but then reports 'Unable to Mount Location, Failed to Retrieve Share List from Server'.

On Personal File Sharing Preference the 'Share Files Over the Network' option reports: 'This function cannot be enabled because the required packages are not installed on your system'. It does not tell me what the required packages are.

The router (BT HomeHub 3) lists all computers and correctly reports which are connected or not. The IP address given by the router is confirmed by ifconfig as which is in the correct range.

BT Desktop Help, which of course will only run on Windows machines, finds everything connected except the Unbuntu.

Windows Explorer finds connected computers and shares, but not the Ubuntu.

So that is it then in a rather large nutshell. There are many features of Linux which I prefer over Windows so I really do not want give it up and anyway it is a challenge.


SecretCode 01-02-2012 12:46 PM

Well the good news it definitely can be made to work.

What version of Ubuntu are you running? With what desktop environment?

Do you have the packages samba and smbclient installed?

It's unlikely to be a problem with your pure IP connectivity, but just in case, make sure that the server can ping all the other machines.
The solution will most likely be somewhere in your /etc/samba/smb.conf file.

What workgroup do all the windows machines belong to?

oakridge 01-02-2012 02:14 PM

Thank you SecretCode for your reply.

I have this nasty feeling that the problem is going to be something perfectly obvious and simple and I am going to feel extremely silly.

It is Ubuntu 11.10 with Gnome.

Samba and SMBclient are installed.

The Linux can ping all other machines by IP address, but only the Windows machines can resolve the name.

The workgroup is workgroup.


rockstar05 01-03-2012 12:46 AM

Hello oakridge,

if your linux system could not resolve the name give that entry in /etc/hosts file

Example: station66


oakridge 01-03-2012 06:49 AM

Thank you Rockstar05 for your reply.

I had forgotten about the hosts file. Oakridge-ubuntu had been assigned along with localhost so that was not helping. I corrected that and entered the other machines on the network and now all can be pinged by name.

We are getting there.


michaelk 01-03-2012 09:03 AM

In a nutshell, windows PCs automatically register their netbios names vs IP addresses but linux PCs do not. This is why you can not ping by netbios name from a linux PC. There are several options like using the host file, DNS or by using WINS.

FYI Nautilus has a built in smb client so you can browse windows shares using a file browser.

oakridge 01-03-2012 09:36 AM

Thank you for your post michaelk.

As I say in my first post pyNeighbourhood can view all four MS machines, but only 'sees' the sub-directories on two. This is not a problem between the MS machines.

The 'Home' icon, which I presume is Nautilus, lists the Windows Network but will not drill down to the actual PCs.

None of the MS machines can connect to the Ubuntu.


michaelk 01-03-2012 10:41 AM

If the Ubuntu PC is running a firewall make sure it allows smb traffic.
Is samba server actually running? The samba processes are smbd and nmbd. You will also need to add a samba password for your users (smbpasswd)
Some samba console commands to see shares are findsmb, smbtree and smbclient.

Smbclient -L netbios_name (just press the enter key when asked for a password)

oakridge 01-03-2012 02:41 PM

Thank you again for your reply michaelk.

Ubuntu does not load a firewall as default and so far I have not installed one.

Samba is running.

findsmb just finds the local machine - ubuntu.
smbtree finds all machines actually running and their shared folders including those which pyNeighbourhood does not list. However, for the ubuntu it reports: cli_start_connection: failed to connect to <20> ( error NT_STATUS_UNSUCCESSFUL

I hope this helps.


oakridge 01-04-2012 11:19 AM

Bingo, yippeee, it works. Thank you all for your help.


michaelk 01-04-2012 03:48 PM

Well done.
Please mark this thread as solved. BTW what was the solution so others may benefit.

oakridge 01-04-2012 04:24 PM

The solution was that I had started editing smb.conf directly as a text file which went fine but then I tried the Ubuntu Samba configuration program which did not work too well. Unfortunately between the twe I managed to delete all text from smb.conf which did not help sharing at all. Fortunately there is a copy so once that was properly edited everything was fine.

I am sorry but my eyesight is extremely poor and I cannot find the 'solved' button. If you could point me at it I will gladly comply.

Thanks to you all again.


P.S. Ah, found the 'solved' link.

All times are GMT -5. The time now is 09:15 AM.