| Grabber Softwares : Enhance Your Computing |
| Setting Up A Linux Office Server
Configuring a Linux file and print server for Windows clients The advantages of having a Local Area Network are well known. However, people have been scared away by the costboth of the Network Operating System (NOS) software and hardware required by these commercial NOSs. One major objective we set was to give our readers a feasible alternativeone that doesnt cost much and will work on mortal hardware, while providing all the services one would expect from a proper office server. Linux does a good job in fulfilling these objectives. At this point we assume that you have successfully installed Linux, using the previous article Installing Rad Hat as a guide. We will now configure Linux box to become a file, print and, domain/security server for your network. It isnt very difficultall it takes is a bit of file editing.
Before you begin, make sure that you have installed a printer (if you intend to use print services) and configured Linux to use it. If you didnt do it at the time of installation, you can do so nowjust fire up X Windows (startx) while you are logged in as root, and click the Printer icon in the Control Panel that appears on the left side of your screen. It wont hurt to run through the process quickly again even if you have configured a printerjust skip the adding stuff and go straight to the tests. If things dont work, this is where to set them right. Here is a quick description of the process (we assume that the printer is directly attached to the Linux machine):
Now you should test the new printer. Make sure paper is loaded and printer is online. Select the printer definition and pull down the Tests menu. Select Print ASCII test page and make sure everything is printed normally. You should not see Stair-stepping-text that advances to the next line but not to the beginning of the line. Next, test Postscript printing. Here you will see your first minor miracleeven if your printer is non-postscript, it will print graphics using Postscript! This is because the print-job is routed through the supplied utility, GhostScript, which converts the Postscript code into something your printer can understand. If both tests are cleared, your printer is properly installed and you can proceed. Configuring for Windows networking Windows-style networking is probably the most common one today (Netware enthusiasts, dont gnash your teethread Netware and Linux) and thats what we are going to set up now. There are two kinds of Windows networkingDomain-based (where you have to log into the server to even see its resources) and Share-based (where you need to know the password for resources you wish to access). The former is the type of networking used by Windows NT, while the latter, also called Workgroup computing, is typically found in Windows for Workgroups 3.11. Each has its merits, and we do not want to get too deep into that now. We will assume that you want to set up Linux to offer Domain-based networking, complete with a security login. The technical name for Windows-style networking is SMB (Server Message Block) protocol-based networking or LanManager-style networking. Though Microsoft refers to it only as Windows Networking, it is actually used by many operating systems and architectures, including OS/2, Digital PathWorks, and so on. There is nothing really Microsoft or Windows specific in the protocol. SMB-style networking is implemented under Linux using Andrew Tridgells original implementation of the SMB protocol for Unix, called SAMBA. It is an extremely complex piece of work, but fortunately very easy to configurejust about every configuration item is stored within a single configuration file that is plain text, with plenty of comments included to help you along. This text file is called smb.conf and is found in the /etc directory (like just about every configuration file in Red Hat Linux-based systems). A few changes in that file are required to get your server up and running, so lets quickly make them. Note: The SAMBA code originally shipped with Red Hat Linux 5.0 is not optimal, so we upgrade it during the installation process using the upgrades kit we have supplied along with our CD-ROM. If you have not yet applied those upgrades, you should do so now. Here we also introduce our favorite little text editor, JOE (Joes Own Editor), and anyone who has ever used WordStar or Borlands original programmer editor is going to feel right at home using it. (Why did we mention this here? Because, you wouldnt believe how many people have shied away from Unix/Linux in the past saying "I dont wont to learn VI or EMACS .".) Learn to use JOE, now, while working: Go ahead, use your cursor keys to scroll and read the file. If you already know something about Windows Networking, youll see many familiar terms and settings. Now hit Ctrl-T-W. (This turns off the word-wrap feature that could otherwise mess up the file). Done? OK, now watch how easy it is to get things configured:
We could have done more, but lets first get these
running. To create the netlogon directory Done? OK, lets test that using the command testparm | less. Scroll through the results and look for any error messagesif you have followed the above steps correctly, your shouldnt see any. Hit q to quit the viewer and go back to the command prompt. Finally, enter the command /etc/rc.d/init.d/smb restart to tell the SAMBA server components to restart using this new configuration file. You should see the existing components being stopped and then restarted. At this point, your Linux-based file, print, and security server is ready for action! Configuring Windows clients To access the Linux file server, your Windows clients must be configured for Windows NT networkingLinux 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! (If you dont have Win 95 distribution on your hard disk, as is often found with pre-installed Win 95 setups, make sure you have your Win 95 CD-ROM or disks at hand.)
Finally, click on OK in the Network Configuration screen. This will probably install a number of componentssome 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 dont, create one (while logged in as root) using the command useradd userid or use the User configuration applet from the Linux control panel if you have X Windows running. In either case, make sure that a password is assigned to the user. From the Linux command line you can do that with the command passwd userid. OK, 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 Neighborhood icon. Note: You may be prompted for a Windows password if this is the first time you logged in this way. Typically, the password will already be filled in in the first field (it uses your network login password). Do not confirm the password! Wipe out this pre-filled password and click on OK. This will stop Windows from asking you for this (effectively useless) password in the future. Once you are succesfully logged in, you should be able to see your Linux servers name through the Network Neighborhood 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 thats it! Adding more resources You will now want to add more sharable resources. For example, lets make the CD-ROM drive on the Linux server sharable by everyone on the network. Simply run joe /etc/smb.conf, go to the bottom of the file (Ctrl-KV will get you there), and add these lines:
Now restart SAMBA server components with Congratulations, your server is up and running!
|