LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba Shares (http://www.linuxquestions.org/questions/linux-newbie-8/samba-shares-921617/)

oakridge 01-02-2012 10: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 192.168.1.66 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.

Malcolm

SecretCode 01-02-2012 11:46 AM

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 01: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.

Malcolm

rockstar05 01-02-2012 11:46 PM

Hello oakridge,

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


Example:

192.168.1.66 station66.example.com station66

Thanks

oakridge 01-03-2012 05:49 AM

Thank you Rockstar05 for your reply.

I had forgotten about the hosts file. Oakridge-ubuntu had been assigned 127.0.0.1 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.

Malcolm

michaelk 01-03-2012 08: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.

http://www.zulius.com/how-to/resolve...es-from-linux/
http://www.samba.org/samba/docs/man/...-networks.html
http://wiki.samba.org/index.php/Moun..._a_unix_client

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

oakridge 01-03-2012 08: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.

Malcolm

michaelk 01-03-2012 09: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 01: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> (0.0.0.0): error NT_STATUS_UNSUCCESSFUL

I hope this helps.

Malcolm

oakridge 01-04-2012 10:19 AM

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

Malcolm

michaelk 01-04-2012 02:48 PM

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

oakridge 01-04-2012 03: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.

Malcolm

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


All times are GMT -5. The time now is 08:24 AM.