I recently decided to start making more use of a neglected computer
of mine. It's an eMac that has been sitting quietly on my kitchen table the past two years. I decided to explore how best to share files,
printers, and applications between a Macintosh and my desktop Linux box.
Keep in mind that I'm not a system admin. I have beaten various PCs
into submission the past 20-plus years, but that's due mainly to
stubbornness rather than guile. The thought of actually having to learn
how to install and configure Samba has kept me from venturing down this
path before. But finally my desire to use it outweighed my fear.
My LAN is a typical home configuration. The cable modem feeds a Belkin
wireless router, which connects to both the eMac and the Linux
box. The eMac can run most legacy Mac OS 9 applications as well as
OS X. My desktop box is running Red Hat 9.0.
I began by installing Samba on the Linux box. It was much easier than
I had feared; all it took was to run up2date
for samba, samba-client, and samba-swat. The up2date utility knew
about samba needing samba-common, so that package was installed as
well. I installed samba-swat because I had heard it provided an easier
interface to configure and use Samba.
I edited a very simple /etc/smb.conf to provide a NetBIOS name
for the server, a name for the workgroup, and to allow access only from
the LAN, not from the wilds of the Internet. The only share I included
was public access to the /tmp directory. Then I ran testparm to see
what it thought of the config. No problems were noted, so I fired up
smb from the services menu to start the Samba server, which started two
daemons running: smbd and nmbd.
The Samba documentation told me I could check things further by entering
smbclient -L localhost at a command line. That seemed to
work, so I decided to add another share for a directory containing
pictures I had taken with a digital camera, and one for the printer as well.
After changing the configuration file to accommodate the new shares, I
stopped and restarted the Samba daemons.
Now it was time to move away from my comfort zone and into the kitchen
to get on the eMac. It's still running Mac OS X 10.1 even though
10.2 has been out for a year. I had previously read that 10.1 provided
some support for Samba right out of the box. I used the
Finder|Go|Connect to server dialog to connect to
RANCHHOUSE and LINSAMBA are the WORKGROUP and NETBIOSNAME values I had
entered in smb.conf. Lo and behold, a new dialog appeared asking me for
warthawg's password. After accepting the password, I had the digital
images available to me on the eMac.
The limited Samba functionality in 10.1 didn't allow me to run a
Samba server to offer file or print services, so I needed more. Up
until that point, and based on nothing but my very limited experience on
the eMac, I assumed that just as in the Windows world, almost all the
good software for the eMac would be proprietary. Someone banged me over
the head for that assumption on IRC. That's how I came to learn about
The members of the Fink Project are doing two
things to bring open source/free software to OS X. They port existing
Unix software to OS X and they use package management tools from Debian
to make those ports easy to get, optionally compile, and install.
Fink requires part of Apple's Developer Tools to work. That sent me
scurrying over to the Apple site to download them. Registration is
required. Once registered, I tried downloading the Developer Tools but
kept getting told I wasn't authorized. The next day I tried
again, and it worked. Perhaps an overnight update process has
to run before the database clears you for download. In any event, I had
the Developer Tools downloaded and installed in no time at all.
Fink quickly followed. After installation I browsed the list of
projects already available and found Samba was there. Getting Samba on
the eMac looked as if it was going to be as easy as typing
apt-get from a command line. And it almost was just that
I hacked on the default smb.conf file included with the Fink install and
after a few minutes I was able to start the smbd and nmbd daemons from a
command line. Everything looked good. Using
smbclient -L I could see Samba running and the shares that it offered.
But when I tried to access the shares from the Linux box, I could get no
further than an NT_STATUS_WRONG_PASSWORD error.
Googling did not produce an easy fix, so I reluctantly decided to put
the notion of a Samba server on the eMac aside, at least
until my next upgrade to OS X, which will probably be later this year.
The current version of OS X includes this functionality out of the box,
so if I wasn't running a one-off version of the OS I wouldn't be having
to jump through these hoops.
But I wasn't done. I ran
fink list from a terminal on the
eMac and noticed that tightVNC was one of the more than 700 Fink-supported packages. I happily kicked off an "apt-get install tightvnc"
but ran into an immediate problem because I didn't have an X server on
the eMac. I dreaded trying to configure Xfree86 on strange hardware,
but I started Fink installing xfree86-base. When I came back to the
machine later, I was surprised to find that not only was X now
on the eMac, so was tightVNC. Fink is pretty cool.
That brought me to where I am now. I can sit at my desktop Linux
machine from the comfort of my office and run FrameMaker on the eMac in the kitchen. I
can also access data on my Linux box while at the eMac. What I can't do
yet is share a printer on either box with the other machine, or share
files from the eMac with the Linux box.
I also learned a little about Samba and OS X. Samba is not as
difficult as I imagined, but it does seem to be very complex
and capable of a great deal more than I am asking of it. And OS X has a
thriving free and open source community that I was
almost entirely unaware of prior to my project.
I also learned that in spite of the wonderful spit-and-polish of the Mac
user interface, it just isn't as easy or as comfortable doing things in
a strange new environment as it is in the environment you're used to
working in. I'll try to remember that the next time I feel like yelling
at a Linux newbie.
Joe Barr has been writing about technology for 10 years, and about
Linux for five. His work has appeared in IBM Personal Systems Journal, LinuxGazette, LinuxWorld,
Newsforge, phrack, SecurityFocus, and VARLinux.org. He is the founder of
The Dweebspeak Primer, the
official newsletter of the Linux Liberation Army.