Published on: Saturday 17th October 1998 By: Tarique Sani
"You teach best, what you need to learn the most!" - Richard Bach, whose book Jonathan Livingstone Seagull inspired me to dream and be different. I quote this here because though this article is about setting up a Linux file, print and security server, my experience of setting up a network consists of just 2 installations with only 7 and 3 clients respectively. So I need lots of inputs from the Linux Gurus out there but to newbie Sys Admins I would like to say that the process is simple and best of all works on mortal hardware.
At this point I will assume that you have successfully installed Red Hat Linux on to your machine which will be the server and also that you have installed your printer as well, if not then do so now with the printer configuration tool on the Control Panel (you have to start X windows first though). Most of the defaults are to be left as they are.
The Windows-style networking is actually the SMB (Server Message Block) protocol based networking and there is nothing MS proprietary about it. Under Linux we will be using SAMBA which is Andrew Tridgell's original implementation for SMB protocol under Unix. Please don't be put off by all the technical details for configuration you just have to edit one file /etc/smb.conf a few lines added and modified will have your server ready. Fire up your favorite text editor joe, jed or Xjed, open the smb.conf file (the smb.conf file is a plain text file). You will see lots of things and comments some of them may be familiar if you have worked on networks before (so I am told) do the following
More can be done here, but let's first get these running. Create the netlogon directory (/home/netlogon), enter the command mkdir /home/netlogon. Enter chmod 0755 /home/netlogon to give it read and execute, but not write permissions.
Done? OK, let's test that using the command testparm | less. Scroll through the results and look for any error messages-if you have followed the above steps correctly, your shouldn't see any. Finally, enter the command /etc/rc.d/init.d/smb restart to tell the SAMBA server components to restart using this new configuration file. That it! Your Linux-based file, print, and security server is actually ready for action!
Just to drive home the point that Linux is simpler I would like to warn that this section to follow is much longer than the preceding one. A funny thing - to access the Linux file server, your Windows clients must be configured for Windows NT networking-Linux running SAMBA and configured the way we did emulates a Windows NT server. In fact, Windows, if asked what server it is connected to, will report a Microsoft Windows NT server! (Make sure you have your Win 95 CD-ROM or disks at hand.)
This will probably install a number of components-some of which require the Windows CD-ROM/disks. When it is through, it will ask you whether it can restart your computer. Click on Yes after closing all applications. The machine will reboot.
If all went well, you should be presented with a Network Logon screen, with your domain name already filled in. At this point, you need to make sure that you have a user account on the Linux machine. If you don't, create one, now try logging in from your Windows machine! Enter your user ID and the password. After a brief delay, you should see your Windows desktop, complete with Network Neighbourhood icon. If you are prompted for the Windows logon password just delete it and you won't be bothered in future
Once you are successfully logged in, you should be able to see your Linux server's name through the Network Neighbourhood icon. Double click on that and you should see various items, including your private home directory folder, the tmp (temporary files) folder, and the printer you defined at the beginning.
Open your personal folder. You can now copy files into it and use it just the way a file server should be used.
Ready for some network printing? Open My Computer and select Printers. Choose Add printer-Next-Network Printer-Next-Browse, select the entry for your Linux server, find the printer icon, click OK-Next, set it as your Windows default printer, and allow it to print a test page. If your network printer is ready, online, and loaded with paper, you should now see the familiar Windows printer test page printing out. Tell Windows that it printed OK, and that's it!
You will now want to add more sharable resources. For example, let's make the CD-ROM drive on the Linux server sharable by everyone on the network. Simply edit /etc/smb.conf, go to the bottom of the file, and add these lines:
[cdrom] comment = LAN CDROM drive (if empty, no CDROM mounted) path = /mnt/cdrom public = yes writable = no printable = no
Now restart SAMBA server components, If you refresh your Network Neighbourhood, you should see a share called cdrom which will show you the contents of the CD-ROM (which you do by inserting a CD-ROM and running the command mount /mnt/cdrom), or nothing if no CD-ROM is mounted.
That's it for now, Yes I know that I have left out the bit on DHCP and DNS set up but that's in the next article. meanwhile read the Network Administrators Guide which come with Linux for more information.