Linux Project

Kim Grempler/Leon Dague

13 July 1999

Objective: To install the Samba software suite and thereby provide file and print services to another SMB client, Windows NT. We used Windows NT but the following are also included: MSCLIENT 3.0 for DOS, Windows for Workgroups, Windows 95, OS/2, DAVE for Macintosh. Samba implements the SMB protocol (i.e., LanManager or Netbios) for Linux systems and is part of the package of Red Hat 6.0. However, we chose to manually install Samba and configure Samba remotely (e.g., smb.conf) via a Samba Web-based Administration Tool called SWAT. SWAT is run from inetd and modifies the smb.conf (which contains descriptions of all the services).

Process: Initially we attempted to edit Samba’s smb.config by hand. It was only later, approximately one week after starting our project, did we find out about SWAT (via available documentation), and decide to regroup and try using this tool because neither one of us had ever used such a tool like this before. SWAT allows the user to configure Samba remotely using the Web.

Originally we attempted to manually enable SWAT and launch it by inetd. This meant editing /etc/inetd.conf and etc/services. Only later did we discover the auto by RPM method (Package Manager as shown in instructions below) which, albeit a learning experience, would ultimately save us from the frustrations of our manual attempts and so we decided to go for it. These manual efforts prior to RPM proved fruitful, in that we gained knowledge about this installation process, through each and every attempt, and thereby gained an overall better understanding as an end result. Only through trial and error as well as avid reading pertaining to Samba and SWAT did we reach our goal of a successful install. Below lists the main steps in reaching that goal.

Instructions:

***Red Hat: Reinstalled RH 6.0 to include the printer support package (e.g., lpd) under customized options. The printer was configured during this time with the following parameters:

queue name: lp

spool dir: /var/spool/lpd/lp

device: /dev/lp0

printer: HP III* with "TIFF compression"

After booting, we logged in as root and looked at Gnome "system/control panel/printers" to verify and test printer installation. Note: It was necessary to enable "send EOF" In "system/control panel/printers" for the ASCII print test to work. Also, during this time MEM OVERFLOW errors were received during the postscript test but fortunately printed fine from Netscape.

Ran Red Hat’s config utility "linuxconf" and defined user "leon" with password "cs691x" in system/linuxconfig/useraccounts.

 

***SAMBA: Next went to www.samba.org to choose a download mirror, receive the latest RPM for RH 6.0, and put it in /var/lib/rpm. The chosen parameters are as follows:

USA

Download binaries

http Redhat folder

RPMS 6.0

Samba-2.0.4b-19990527.i386.rpm (file is approximately 2.5 megabytes)

Got into xterm window and installed the package with "rpm -i".

rpm-i/var/lib/rpm/samba-2.0.4b-19990527.9386.rpm

***SWAT: Next went to enable (e.g., launch) SWAT using Netscape browser, via http://localhost:901. While logged in as root, SWAT was started (the rpm install enabled SWAT from /etc/services and /etc/inetd.conf). A main menu appears.

In SWAT click the mouse on "Globals" for global variables, and define the workgroup as "CS691X_18."

The "encrypt passwords" was changed to "Yes" because we wanted to use WinNT service pack >=3 without modifying the registries.

In the "hosts allow" field, enter " Localhost, 130.85.99.26"

Note that the "Localhost" IP address is 130.85.99.27 (PC #18).

This provides one host to connect to avoid conflicts with other class project experiments, which may be going on.

Finally, click the mouse on "Commit Changes" for "Globals".

This brings you back to the main menu. The next step is to mouse-click on Printers to set the printer parameters. Since the printer was created during RedHat, we can bypass the "create printer.

Next on the drop-down box next to "Choose Printer," we select "[*]lp". And click on "Choose Printer."

By further scrolling down the page we locate and click on "Advanced view." Once in advanced view, the following printer commands were specified:

PRINT: lp -P%p %s; rm %s

LPQ: lpq -P%p

LPRM: lprm -P%p %j

LPPAUSE: delete (make it null)

LPRESUME: delete (make it null)

FYI: -P%p (variable for more than 1 printer)

%s (spool filename)

rm%s (deletes spool file when finished)

All the other fields were left unchanged and we thereby clicked on "Commit Changes."

We again were brought back to the main menu. The next step was to mouse-click on Passwords.

Under "Server Password Management" we typed in user name "leon", then the password "cs691x". We then clicked on "Add New User." To verify that user "leon" was created successfully, we looked at /etc/smbpasswd. After that we went back to the main menu.

One important note is that in order to create new Samba users, these users must first exist in the Linux system password file (/etc/passwd). We cannot add Samba users without a valid local system user! This was one problem we encountered that took us some time to figure out via reading through documentation and trial and error debugging.

To enable Samba and to allow access to the server and printer, we mouse-clicked on the "Status" icon in the SWAT main menu. In "status" we clicked on start smbd and start nmbd. Both provide four basic Common Internet File System (CIFS) services. The smbd provides file space and printer services to clients that use the SMB protocol. The nmbd provides name resolution and browsing services.

Also under the SWAT "status" menu, activities on the NT PC side (from other SMB clients) are displayed to tell us that both sides are communicating with each other.

We were now ready to venture over to our Windows NT PC.

***Windows NT: To set up the NT machine 130.85.99.26 (e.g., PC #17), we first logged in as administrator, and in "Network Properties," changed WORKGROUP

to CS691X_18.

We ran the Programs/AdministrationTools/User Manager to add user "leon" with password "cs691x". The parameters are as follows:

User

New User

Password set to never expire

We also needed to install the NT HP printer driver.

The system was then rebooted to recognize these changes.

The user signed on as "leon" and through clicking on "Network Neighborhood", we had access to Linux directories on PC #18 as well as print to //pcecs237-18/lp using Netscape.

Another important note involving our printing debugging pertained to the "not so obvious" printer error messages. These messages were not informative at all and most of the time had nothing to do with the actual problem. One error we kept getting while trying to print was "can not login from this." which made no sense to us whatsoever. Sometimes we did not get any messages at all. Nothing would print, no errors would occur, and the system continued to run as if nothing was wrong. This proved to be very frustrating to say the least.

 

***Final thoughts: This project was instrumental in teaching us the ever-evolving problems, changes, frustrations, and challenges that a system administrator faces when installing new packages. Granted, we did learn a great deal about Samba and SWAT, but we also realize that due to time constraints, we only scratched the surface in what they can provide.