Part V) Set Up Networking for a mixed Ubuntu Linux / Windows LAN
In this section we will concentrate on sharing files between Ubuntu Linux and Windows, both on your computer and between different computers on your LAN.
First let's mount the FAT32 partition you created for sharing.
System --> Quit --> Logout (or Switch User)
Login as root
Open File Browser
Create a /fat32 directory (in the File System)
If you want your Linux users to be able to write to this partition, you will need to enable permissions to do so.Right click on the /fat32 folder you created, click on Properties --> Permissions and click the write box for each level of user for which you want to grant permission. If you want everyone to be able to write to that partition, for example, click the "write" box for "others". Otherwise you can allow a "group" of users to write, and specify the name of the group. (Note: "groups" of users are created or modified in the "System --> Administration --> Users and Groups menu.) At the least specify write permission for your regular "user" login (fido in the examples we have been using).
Close and logout as root (System --> Quit -->Logout)
Now log back in as your usual user (e.g. fido)
System --> Administration --> Disks --> Partitions tab
There should be at least two FAT32 partitions there. One should be the same size as your Windows primary partition (20Gb in my example from Part I) and the other the same size as your second (extended) partition, about 32Gb. Here you should decide whether you want to mount the primary Windows partition, on which the operating system resides, or not. I would advise against it -- let that be a protected, isolated partition. (However, many people do mount their primary Windows partition for sharing anyway.)
For the second partition, let's decide on a name for it. Most likely that partition has been designated drive d: in Windows, so you could call it d_drive in Ubuntu Linux to be consistent.
On the line for Access Path:, click "Change". When the file browser comes up to choose the folder, find your newly created /fat32 folder in the File System and click on it to choose it. Now "Create folder" and type in "d_drive". Now the d: drive partition is officially "mounted" in your folder /fat32/d_drive. You can find all the folders that were on the on the d: drive partition (if you have any) listed as subfolders in the folder /fat32/d_drive. Do this for any other FAT32 partitions you created upon installation.
Now double check that the permissions you set for /fat32 carried over to these new folders. Right click on /fat32/d_drive and make sure write permission is checked for the group which includes your usual login id (fido). If it doesn't, go back to root login and change the permission accordingly, then logout from root.
Then, back in your usual login again, "make a link" to the /fat32/d_drive folder by right clicking on the folder name again in File Browser. Drag that new link into your /Desktop folder in your home directory. Rename it to d_drive again (or whatever you want.) Now d_drive will show up on your Desktop. You can erase the link anytime from on your desktop and it will not touch the actual folder itself. (This is the same way it works in Windows with Shortcuts, too).
Next we will try to sort out networking between computers on the LAN.
There are two ways to associate computers in a group: domains and workgroups.
In fact, a domain can have several workgroups. For example, on a large hospital chain's network, each hospital may have a unique domain. Hospital A may have hospdomn1, hospital B may have hospdomn2, and so on. Within a single hospital's domain (example hospdomn1), there may be several workgroups. All the computers in clinical departments may belong to one workgroup (squawnet, for example), the administration to another workgroup (jefenet), and the financial department to a third workgroup (mulanet).
A domain uses a centralized resource management service, the domain controller. Requests to login to the domain are handled by the controller, and users and user permissions are handled by the controller.
In contrast, a workgroup is more of a peer-to-peer grouping, where each computer can directly communicate with another computer within the workgroup, without the overt permission of a controller.
A brief overview of this difference is presented at
http://eserver.bell.ac.uk/mirrors/win2000/pt3_1.htm#workgroups
This concept of whether to use a domain or a workgroup and the attention to using the same naming convention for each, consistent for every computer in the workgroup or domain, is the single biggest stumbling block for making your mixed-operating system LAN function transparently.
In general, most small LANs do not have a domain controller and therefore should be considered a workgroup.
Now, while Linux computers use the nfs networking protocol to communicate between each other on the LAN by default, they can also use the Samba (smb) protocol. Since the Samba protocol also allows communications with Windows computers on the network, we will therefore concentrate on Samba.
The three packages used to run Samba in Linux are samba, smbclient, and smbfs. An optional graphic (web-browser based) administration tool for Samba is Swat. If you want to try this, you will also need to install swat and netkit-inetd. All these packages are best installed in Ubuntu through the Synaptic Package Manager. [You could, however, also enter
apt-get install samba smbclient smbfs swat netkit-inetd
from the command line terminal after becoming root user with sudo -s].
A third, sometimes less reliable method of enabling Samba is to try to share a folder from the System --> Administration --> Share Folders menu. When you type in the name of a folder that you intend to share, you will be prompted to choose whether to share it over Samba or NFS. The first time you choose Samba, two of the three packages (samba and smbclient) will be installed automatically. (smbfs is for mounting folders from Samba, and for many purposes is not essential.)
After the packages are installed, the workgroup name for use in Samba must be confirmed. You may have set the workgroup name correctly when you installed the server, since it was one of the questions you were asked as part of the installation routine. If not, here's how to change it. (This can also be configured from within Swat, if you installed it.) Edit your Samba configuration file by opening the command line terminal, logging in as root with sudo -s, and using gedit to open the file:
gedit /etc/smb/samba.conf
Now look for the line with "workgroup" in it and set it to:
workgroup = newbienet (or whatever you have set your workgroup name to be)
Now, I initially also set the line:
security = share
to allow sharing of folders without user passwords, the same way as is done on the Windows network. (This setting is insecure, though, so later in the security section we will restrict privileges by creating samba users and samba passwords. This can also be achieved with a graphical frontend called gsambad.) Although this setting is insecure, it allowed me to check that the system was working.
Save the file and close.
Restart the Samba server with
/etc/init.d/samba restart
To otionally check your Samba configuration, you can start Swat (Samba web administration tool) from your Firefox browser:
http://localhost:901
User: root
Password: fountain2468 (or whatever your root password is set at)
You can set shares from this Swat menu, configure sharing of printers, and many options.
At this point I could share designated folders on all computers except for one. (Any folder for which the user has permission can be designated for sharing by right-clicking on it and choosing "Share folder.") On this stubborn computer I had previously installed the Firestarter firewall and it basically was blocking Samba communications by default. I changed the settings to allow Samba connections to and from all the IP addresses within my LAN and after restarting Firestarter, everything worked fine. (See the Firestarter documentation. Make sure Samba (smb) is allowed as both an inbound and outbound protocol for your entire LAN, designated as 192.168.xxx.1/24, and make sure in Edit --> Preferences --> Advanced Options that broadcasts are not blocked. Further troubleshooting can be found at:
http://www.ubuntuforums.org/showthread.php?t=190542&highlight=samba+windows+unauthorized+access ).
Now I was able to share folders in Ubuntu in the same fashion as I did on Windows, through the Nautilus File Browser. (I could also use Places --> Network Servers from the menu bar). Whenever a folder is listed in the file browser, I could right click on it and mount it permanently to my desktop and file browser.
Now, most Windows XP computers are already set by default with a workgroup name of "MSHOME". So I then needed to change this workgroup name on all my Windows computers, to "newbienet" in the example. To change either the workgroup or domain name on Windows XP (and in fact to choose whether your Windows computer will use domain or workgroup associations in the first place), right click on the "My Computer" icon on your Windows desktop. Select "Properties" then click on the "Computer Name" tab. Make sure your computer has a unique name here that you wish to be listed on the network. (One of my computers is named "windserv1", for example.) Then click the "Change" button and you can select the workgroup or domain name. Unless you have a domain controller, set this to workgroup and use the workgroup name you have chosen (e.g. newbienet).
Now, if you actually do have a domain controller somewhere on your network and actually do use domains, you could set the domain on your Ubuntu Linux computer this way:
System --> Administration --> Networking
General tab: Domain name: newbienet
DNS tab: Search Domains: newbienet
Note that this is also the place to enter the name of your Ubuntu computer on your LAN network. It generally should already be filled in with the name (vistaserv1) we chose at installation, but you can change it here if you'd like.
(In the beginning I entered my workgroup name (newbienet) as my domain name as well, for superstitious reasons. I always suspected that this shortcut of giving the same name to both the domain and workgroup saved me a lot of networking headaches in the beginning, but it probably didn't. So now I leave it blank and it doesn't seem to make any difference.)
(To be continued. A newer version of this page may soon be available at Perspective Office (perspectiveoffice.dyndns.org))
After sorting out networking, let's try to set up a web page in the next section.
| Home page
| Introduction
| Chapter I: Installing Windows on a dual-boot computer
| Chapter II: Installing Ubuntu Linux Server on a dual-boot computer
| Chapter III: Adding the Ubuntu Desktop on a dual-boot computer
| Chapter IV: Spiffing up Ubuntu Linux
| Chapter V: Ubuntu/Windows shared networks
| Chapter VI: Setting up a Web Site on Ubuntu
| Chapter VII: Ubuntu/Apache Virtual Hosts (Multiple web sites, single server)
| Chapter VIII: Installing Drupal Content Managment System
| Chapter IX: Installing Vista Office EHR
| Chapter X: Installing an Office Surveillance Security System with Ubuntu
| Chapter XI: Installing an open source Groupware Server
| Chapter XII: Installing a non-linear video editor for presentations
|