Tuesday, September 28, 2010

Ubuntu 10.04: Ethernet Networking Two Computers and a Router

I had installed Ubuntu 10.04 on two desktop computers.  Both were connected by ethernet cable to a router.  This seemed like the basis for a network, so that the two computers could talk to each other directly.  I had not previously set up a network in Ubuntu.  This post describes that learning experience.

I started with a search for guidance.  This led to a thread that persuaded me to try Samba shares, with Webmin for my Samba GUI.  So I typed these lines, one at a time:

sudo apt-get install samba
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.510-2_all.deb
sudo dpkg --install webmin_1.510-2_all.deb
sudo apt-get install -f
The last line was a response to the error messages.  Then, in Firefox, I went to https://localhost:10000 and, after confirming a security exception, I entered the same username and password that I used to log into Ubuntu on the computer.  This gave me a locally stored Webmin webpage.  I clicked "Refresh Modules" on the left side of the page.  When that process was done, I clicked on Servers, in the top left corner.  Sure enough, it said, "Samba Windows File Sharing."  I went through that same process on both computers.

Then I searched for information on how to use Webmin.  This led to the discovery that Webmin was not fully compatible with Ubuntu, which would explain why it wasn't available for download through Synaptic.  So now it was time to undo what I had just done:
sudo apt-get remove webmin
sudo apt-get autoremove
As an alternative, someone mentioned eBox.  It looked like eBox had had some hard times, but hopefully those were all behind us now.  So I went into Synaptic and marked ebox-samba for installation.  This brought the plain ebox platform and a boatload of other packages along with it.  One of those packages was ddclient, which asked me many questions that I could not answer.  I tried to fake it, just going with the defaults, but wound up with an "Empty host list" message telling me that I had failed in some significant sense.  With that taken care of, Synaptic went ahead and installed all these downloads, presenting me once again with the ddclient Empty host list before it was done.  Yet after all that, there was no eBox icon in my menu and typing "ebox" at the prompt just gave me "command not found."  So I used the same steps as above to remove eBox.

A different search led to a page that advised me to type this command:
sudo apt-get install samba samba-common system-config-samba
With that done, I went to System > Administration > Samba.  This brought up a Samba Server Configuration dialog.  There, it looked like I could go to File > Add Share to designate a folder that would be shared between computers.  I took these same steps on the other computer.  Then I specified a folder on one computer that I did want to share.  I made it writable, visible, and accessible to everyone.  I found that this had to be a folder; I couldn't share a whole partition.  Later, I saw in another source that I should also have gone into Preferences > Server Settings > Security tab, there in the Configuration dialog, and change Authentication Mode to Share and Guest Account to my username, so I went back and did that,  Then, back in Nautilus, I right-clicked on that folder and selected Sharing Options > Share this folder and allowed others to create and delete.  I right-clicked on the folder in Nautilus again and went to Properties > Permissions, but it was already owned by me with all kinds of rights and privileges.

That seemed to be all I was supposed to do.  But I couldn't figure out where I was supposed to go, on the other computer, to see the shared folder on the first computer.  Eventually I saw instructions to go to Ubuntu's menu > Places > Network.  There, it had entries for each of the two computers, plus something called Windows Network.  I found that, if I just double-clicked on the entry for the other computer and then waited patiently for it to do its thing, with no visible indication that it had heard me, eventually (after maybe ten seconds) it would get around to showing me the shared folder on the other computer.  And it worked:  I was able to retrieve a file from that other computer.

0 comments: