Heterogeneous network with Samba
From Mandriva Community Wiki
This page is a translation/adaptation from that one
Actually, this page is only talking about elementary shares config on mandriva hosts. The windows shares config is widely described on the web.
For the scanners shares, one can see Scannerdrake.
- Mac under OS X with graphical network utilities
- PC IBM under Windows XP SP2 with graphical network utilities
- PC Dell under Mandriva Spring (2007.1) with graphical network utiilties and external USB hard disc
- Epson Stylus C64 Printer
- Epson Perfection 1260 Scanner
- Internet Access via ADSL Livebox
We want to be able to access the Internet, print, and scan from each client machine. We also want to securely share the USB hard disc. The first step toward network design should be done with paper and pencil. This will help save money and force us to think through a design that will work for us. It will not be set in stone, but this design will help guide us through the process. For our small network, this job should be simple.
Choose the network protocol
It is necessary for very different operating systems like Linux, MacOSX and XP to communicate with one another over the network. There is one application that is (almost) perfect for this role: Samba, which is an implementation of the Server Message Block (SMB) protocol recognized by all 3 operating systems.
Identify the router
A network needs a router, i.e. a network component which "routes" the right information packets to the right machine. For example when 2 stations are connected on the Web, it is not necessary for the pages required by one machine to be posted on the screen of the other. Any modem from an internet service provider can make the connection, its routing is entirely transparent.
Choose the server
The "server" is the machine which will provide its resources to the other machines. My main PC is entirely appropriate given its design features and its easily configurable Mandriva Linux operating system.
Name the workgroup
The "workgroup" the common space in which each machine of the network will find its network-related and shared resources. Simply choose a name. In this case, the name is "STSELVE".
Name the computers
Each machine must have a "hostname" to identify it on the network. One can also assign a fixed “ipaddress” to a network location. IP addresses are groups of 4 numbers separated by decimal points or periods or full stops, depending on where you're from. On our network the router requires that the internal addresses be in the form 192.168.1.xxx. The modem has the address 192.168.1.1
| || || |
| || || |
| || || |
| || || |
| || |
Identify the users who must share resources
In our case, only 2 users will be logging onto the network. They may log onto any of these machines.
- My partner: on the Mac her real name is Caroline and her username is macuser (the Mac OS was installed that way)
- Myself: real name Gilles and username is Gilles. No need to complicate the things!
Having specified all this information, we can begin the great operation.
- Attach the shared peripherals to the server PC (here the PC-DELL)
- the printer
- the scanner
- and the external USB drive.
- Connect the network cables (Ethernet) to the modem.
Configure settings on the client computers
- Mac configuration
- Enter the name of the machine: “mac”
- Register the name in the work group STSELVE (thanks to the tool “directory format”)
- In “System preferences”
- => sharing: Enable the service “Windows sharing” (Samba)
- => network: Define a fixed IP
- => users: Create the Gilles/gilles
- PC-IBM configuration
- Same operations as for mac but with the Windows tools
Configuration of the server under Mandriva : PC-DELL
Starting from an existing installation, the installation of Mandriva is presented in it's own page in this Wiki. You can refer to the following links :
Once the system is installed, login a session as a regular user and launch the Mandriva Control Center which will be useful through this tutorial. You will need the root password.
You need to install the following administrative tools packages
- drakwizard (installs wizards for the network configuration),
- and smb4k (allows access to the network).
Create user accounts
One must also add them to the Samba users. This is simple thanks to the Samba configuration module in the Mandriva Control Center
Configure fixed network addresses
Network and Internet > Configure a network interface, to the static ipaddress of the server.
Icon To modify some Internet settings Set the hostname of the machine.
We will enter the various parameters SAMBA. All is done in the Mandriva Control Center in some screens. Browse through Mandriva Control Center > Network sharing > Share drives and directories with Windows (SMB) systems…
If it is not already, it is proposed to install the package 'samba-server'. When done, a wizard offers to configure a simple server. Is life not beautiful? If the wizard does not start automatically, in the case of a new configuration for example, simply click on the menu samba server / configure.
To point the wizard to the server…
…and the name of the workgroup…
…then to accept the other default settings. To create an external USB drive sharing: thumbnail : File share .button : modify
As of this point, my partner will be able to save files in her home directory! A last adjustment remains to be made: it is necessary to deal with the firewall to allow Samba to connect.
Security > Fire wall Check the box corresponding to Samba and then save settings.
- This is just as simple: the Epson printer connected to PC-DELL is recognized by Mandriva and is automatically installed and shared, and the other machines in the workgroup have access to it.
- To share a scanner, you simply have to open scannerdrake and indicate that you want to share the scanner.
While following a simple, logical and rigorous procedure, and with the native tools provided by Mandriva, creating a small network is very simple. If that does not work the first time, do not hesitate to ask for help in the forums.
Note : these pages may be outdated.