Subscribe to Windows IT Pro
March 01, 1997 12:00 AM

Samba-UNIX and NT Interoperability Made Easy

Windows IT Pro
InstantDoc ID #471
Rating: (0)
UNIX and NT Interoperability Made Easy

On the surface, Windows NT and UNIX seem so completely different. Even if you've seen a hot rod UNIX system running X-Windows, it still looks incredibly foreign compared to NT. Well, the truth is that they are different--but that difference doesn't mean they can't exist in harmony on the same network. In this article, I'll show you just how easy and cost effective integrating these two systems for common file and print services can be. I tried this integration on my network, and it works beautifully.A popular form of sharing services in mixed environments today is the Web--whether the Web is internal or external. But, the Web aside, perhaps the most desired form of interoperability today is for simple file and print services. Certainly UNIX systems make excellent file and print servers, as do NT systems. And any shop, large or small, might need to integrate these two different operating systems for file and print interoperability. You can accomplish this task with one of several methods, but one of the most cost-effective and easy-to-use ways is a product called Samba.

Samba, written by Andrew Tridgell from Australia, builds a multilane expressway between NT and UNIX systems. The name Samba is a play on the acronym SMB, which stands for Server Message Block. By no coincidence, SMB is the standard protocol NT uses for sharing file and print services. Samba runs on UNIX, enables a UNIX host to establish shares that Windows clients can map, and enables UNIX clients to map shares on Windows hosts (Windows for Workgroups--WFW, Windows 95, and NT). This tool is handy to have around in a mixed networking environment.

Samba is available for most common UNIX platforms, including Linux, FreeBSD, BSDI, SunOS, Solaris, AIX, IRIX, OSF1, and HP-UX. Samba is also available for Novell and VMS networks. You can download this freeware software package from the Internet. Samba is in release version 1.9.16p9, and you'll find links to common download sites right on the Samba home page at http://lake.canberra.edu.au/pub/samba/samba.html.

I'll walk you through the integration process. Once you complete this exercise, you'll have a lot more functionality on your network.

Assumptions
Now before I get started, I'll make a few assumptions known, so you know how to proceed. I'll assume that you already have a supported UNIX system installed and working correctly, complete with TCP/IP networking enabled. In this example, I'm installing Samba on one of my Linux servers --Linux is also free on the net--so pay attention to the details, and set parameters correctly for your particular UNIX operating system. Next, I'll assume that you have a C compiler installed on your UNIX system and that you are vaguely familiar with using it. And, I'll assume you know your way around your UNIX system to some extent, so I'll omit details such as commands to change directories.

Finally, I'll point out that on UNIX systems, network server-based services are daemons, and on NT, they're services--just so you know what I'm talking about later in this article. With that said, off you go!

Make It So
Create a directory for the software source code. I used /usr/src/samba. Don't forgot to set the file permissions correctly to keep unwanted users out of the source code. If you don't want to compile source code, you can download the binary executables for certain UNIX systems (not all). But, I recommend you get the source code in case you run into problems with the software or want to make enhancements.

Go to the new directory, FTP the Samba package from ftp://samba.anu.edu.au/pub/samba down to your UNIX system, and place the archived file in your new directory. If you have trouble with the first ftp site, try one of the mirror sites.

Decompress the archived file with the tar command. On my Linux system, I used

tar xvfg samba-1.9.16p9.tar.gz

to decompress the file. This command unpacks everything, re-creating the original subdirectories in the archive as necessary.

Move to the newly created /usr/src/samba/samba-1.9.16p9 directory, and with your favorite UNIX text editor (joe or vi will do just fine), open the file Makefile for editing. This file contains several switch settings and, most important, sets up the software to compile on your UNIX system--all basic C programming stuff.

Make sure the settings in the top half of Makefile are set the way you want them, per your operating system and compiler. Comments in Makefile define the switches, so look at the switches closely and check each one carefully. Next, scroll down until you see your operating system, and enable only that section, making sure no other operating systems are enabled. For Linux, the Makefile section is incredibly simple (but others are more extensive):

# Use this for Linux without shadow passwords

# contributed by Andrew.Tridgell@anu.edu.au

FLAGSM = -DLINUX

LIBSM =

After you've completed the necessary changes for your UNIX system, save Makefile to disk, and exit the editor. Now you must compile the software, so issue the make command to get the ball rolling. In typical compiler fashion, you'll see tons of messages fly by on the screen as the compiler builds the necessary files to create the two Samba executables (daemons).

Now you must install the compiled software. Issue the command

make install

Related Content:

ARTICLE TOOLS

Comments
  • Clifton Hairston
    13 years ago
    Aug 12, 1999

    Wow! I was surprised to see an article on Samba in a Windows NT magazine. I really shouldn’t be though. Seeing articles about how to use non-Microsoft systems with the likes of NT is really nice.
    Your article mentioned that you used the following command:



    tar xvfg samba-1.9.16p9.tar.gz



    to uncompress the tar ball. Are you sure you didn’t mean tar zxvf or xvfz? Your article was the first time I’ve seen the -g switch to untar something, and I tried that command on another file on this system and it wouldn’t work. Good article, and keep up the good work.

    --Clifton Hairston




    The xvfg switch is what I used on my version of Linux. This switch could be different on your system, depending on what version tar you’re using.

    --Mark Joseph Edwards

  • Lisa Henry
    13 years ago
    Aug 12, 1999

    So I got my March magazine on a lazy afternoon, started flipping through it; read Mark Joseph Edwards’ article, “Samba”; and thought it just looked too easy. I had an hour to kill, so I followed your directions and had Samba running on my Sun in no time. I opened Network Neighborhood on my NT Server, and there Samba was! Wow. Of course, I look like a hero around here, and I’ll take the credit ;), but I wanted to thank you for such an entirely useful article.

    --Lisa Henry

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.