Low End Mac
Search LEM 
WebTV/Small Screen Version · Donate · Amazon.com · MacResQ · Advertise
Other Cobweb sites: Apple Quicklinks · Digigraphica · Low End PC · Reformed.net
Quicklinks: · Power Macs · 'Books · Early Macs · Week's Best Deals · Best Buys · OS Downloads
Low End Mac's Online Tech Journal

AppleShare on Linux

L Victor Marks
2001.08.28

You've got a spare PC. You've just come over from the Dark Side™ and are wondering what do with the old beige Pentium-based machine?

Or maybe you've used Macs forever and are looking at a way to allow a large number of users to share files on a central server.

In either case, with a cheap PC (or even an expensive one) you can install Linux and AppleTalk services for Linux and have large amounts of hard drive space available for many users.

Linux has no limitation on the number of users

The benefit is that Linux has no limitation on the number of users that can be simultaneously logged in and no limit on how many users you may set up sharing for. Jeff Adkins recently wrote on article on Low End Mac about the so-called "Wall of Ten," a limitation of File Sharing that restricts the number of users with access in the following ways:

  • No more than 10 folders can be "share points" at one time. A "share point" is a folder or drive volume which appears on the network as a device you can connect to remotely. You can share many more than 10 folders within a single share point, but they cannot be logged into separately. So if you wanted to have a folder for every user, secure from other users' eyes, 10 is your limit.
  • No more than 10 users can be connected simultaneously.
  • No more than 100 users can be listed in your Users and Groups file. (Most teachers, at least in high school, have well over 100 students.)

Apple Knowledge Base Article 15460 describes these limits in more detail. (Please note, the above was shamelessly stolen from Jeff's article. It'll do you good to read it.)

As with any new software package, pay attention to the system requirements. Linux is growing, and the list of hardware compatible with Linux is ever-expanding. Still, you should consider looking at what hardware is supported by the distribution of Linux you choose. Make sure that you have a compatible ethernet card, for example, as some older PCs don't necessarily have one. I have had good luck with 3Com PCI ethernet cards. For Linux on a Macintosh, again, follow the system requirements as laid out by LinuxPPC, Yellow Dog, SuSE, Debian, or whichever distribution you choose.

First off, you'll have to make a few decisions. Do you intend to keep Windows on that PC or are you fine with erasing that hard drive? If your PC has a small drive to begin with, you might consider buying a large drive and using that instead -- after all, we are talking about creating a file server.

Second, which Linux distribution will you use? This is the topic of many a flamewar. I don't intend to start one here, but will recommend a few. Red Hat is an ever popular robust distribution of Linux. Make sure you use a version where the point release is greater than zero (7.1, for instance.) You might also choose to use Mandrake, a distribution with many similarities to Red Hat, with a focus on ease of use and configuration.

These distributions, when used with a default install, can fill over a gigabyte of disk space. If you don't need a graphical interface and don't need a Web server, you can likely select an install option that will require less disk space. While Linux can be made to fit on a bootable floppy drive, I don't recommend that you, as a new user, try to select your own packages to pare the installation size.

While the focus of this article isn't teaching you to install Linux, there are five things you may want to consider and prepare for before installing:

1) What drive will you install Linux onto?

Remember, we're using this box as a file server, so you may want to use a larger hard drive. Linux has several folders that it requires for a working system. These folders can also be created as partitions. Linux doesn't really care either way. In any case, your shared files will all be stored in subdirectories under the /home volume. If you go with partitioning options besides making the drive one large partition, or letting the installer automatically create the partitions, make the /home volume as large as you can. Having /home be a separate partition is a smart plan.

2) What sort of installation type should you install?

Server, workstation, graphics manipulation, multimedia, and other classes of installation are available to you. Unless you have a greater plan about how you'll use Linux beyond file sharing, workstation is likely to be fine. If it's not, you can always install other components later.

3) Set the root password and create user accounts and passwords.

The Root user
is king of the
Linux system

The Root user is king of the Linux system you're installing. Root is all-powerful, and has access to every file on the system and every configuration. With great power comes great responsibility, for a slip-up as Root can seriously disable the Linux system. (Not to fear, if you can still get the system to boot as root, you can almost always fix the system.)

You must set the password for the Root user, but you should create user accounts as well. If you log into a lesser privileged user account for everyday use, you eliminate 99% percent of the opportunities to screw up your system. You will need to create user accounts for every user that requires a private file share on the Linux box. You may create them during the installation of Linux or once you have a working system up and running.

4) Set ethernet configuration.

You can use DHCP, BootP, or set a static IP address at this time. There are configuration tools for changing it later, but it's easiest to set it right at this time. This way, when you boot into the system for the first time, networking is already configured and ready to go.

5) Configure Xwindows, video card, and monitor type.

Xwindows is the one of the systems that allows Unix and Linux to have a graphical user interface. When shipped with Linux, it can also be referred to as XFree86. The installer may probe and recognize your video card, but it will not be able to detect your monitor settings. If you find your monitor in a list that Linux knows, that's great. If it doesn't you'll need to find that paper booklet that came with your monitor and told you what your horizontal and vertical sync ranges are. Sometimes these can be gotten from the website of the monitor's manufacturer.

Boot into Linux. Login with your user account. Get familiar with the system, and explore a little. find an application called the Terminal, also known as a shell, Xterm, console, or Konsole. The Terminal is daunting to look at, especially for long time Mac users. If you have any experience typing in a MS-DOS window, this shouldn't be too painful to use. If you want more information on using the Terminal, Apple has a page that's intended for folks using Mac OS X and Web serving, but they discuss common commands in the Terminal. We'll come back to using the Terminal in a moment.

Test your network connection by opening a browser and surfing the Web for a moment. You should have a link to Netscape on the desktop or on the taskbar. You'll be asked to accept a license agreement, and then the browser will open.

If your network connection works, and you've sufficiently played around in Linux and are ready to get down to business, logout and log back in as the Root user.

Download

Download the Netatalk package from SourceForge. This website lists all of the versions of Netatalk for different platforms as well as beta and stable releases. You'll want to download a current release for Linux.

It is important that you look at the suffix of the download you choose. You want to get a .RPM. RPMs are Red Hat Package Manager packages that install and upgrade easily. Many people refuse to use RPMs in favor of downloading the source code in .tar.gz format, but as a new user, I won't ask you to go through the extra steps.

Look at the text within the download. You'll see that some of the files have RH7 in their names. These are appropriate for Red Hat 7.x installations of Linux. The downloads that have MDK in their filename are meant for Mandrake systems. Save this file to your /usr/local/src directory. When Netscape asks for the location you'd like to save this file in, make certain that the field for the file name contains /usr/local/src/netatalk-1.5pre6-1mdk.i586.rpm where the latter part is the name of the file you intend to download for your system.

In your terminal, you'll need to change directories from the /root directory, to the /usr/local/src directory. Do this by typing cd /local/src and pressing Enter.

Install the Netatalk package In your terminal window, type rpm -Uvh netatalk-1.5pre6-1mdk.i586.rpm, where the filename is the same as the one you've downloaded. The Red Hat Linux 7.0 Reference Manual, includes some chapters on using rpm, and using Gnorpm. Gnorpm is a graphical method of installing, upgrading, and managing RPM packages. We're using the manual method from the Terminal simply because I can't predict that you have Gnorpm installed on your system, or where you might click to invoke it, as different distributions set up the graphical environments differently.

Reboot

In your terminal, you may type either reboot, or shutdown -r now, and the system will restart. Login as the root user this time. Don't make a habit of logging in as root, but for the next step, you'll need to. For most tasks in Linux, you don't have to reboot, but since this Apple file sharing is a service that comes up at boot time, I'll want you to reboot. There are ways to restart the services that run at boot time without needing to reboot, but for simplicity's sake, we'll restart the computer.

Test install in Chooser

On your Linux box, open a Terminal, and type ifconfig. If you look at the section that is headed by eth0, you will find the IP address of your Linux machine.

for example, ifconfig on my computer shows this:

root@eliot:/home/vmarks > ifconfig

lo

Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:642 errors:0 dropped:0 overruns:0 frame:0
TX packets:642 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

eth0

Link encap:10/100 Mbps Ethernet HWaddr 00:20:35:29:36:0A
inet addr:192.168.1.101 Bcast:9.37.63.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:2000 Metric:1
RX packets:269619004 errors:10 dropped:0 overruns:0 frame:0
TX packets:207244 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0x7800

Where inet addr:192.168.1.101 is the IP address that is bound to your ethernet card.

On your Macintosh, open the Chooser and select AppleShare. You'll be asked to enter an IP address, username, and password. Enter the IP of the Linux box along with a username and password that is valid on the Linux box. A mapped file share will appear on the desktop, and will open directly to the home directory of the user who was authenticated in Chooser.

Add users as necessary

Anyone who desires a private share on the Linux box must have a username and password on the Linux box. All user directories are stored under /home/.

First, you must know how to become Root from being logged in as a regular user. You may either log out and log back in as Root, or you may use the su command from the terminal. You will be asked for Root's password and then may be given the # mark as a prompt. Regular users have $ for a prompt. (Some terminals have settings that ignore this convention. Those terminals tend to put the user name in the prompt, as in root@eliot:/home/vmarks > where my user name is root on the machine named eliot and I'm in the /home/vmarks/ directory. ) When you are done acting as Root, type exit and press enter. You will be returned to your lesser-privileged user status.

From a terminal window as root issue the following commands:

# /usr/sbin/adduser (username) where username is the name of your new user.
# /usr/bin/passwd (username)

and type in a new password for the new user. By default the user will have a new group with the same name as the user.

Gil Becerra writes: This will work, but it will not create a home directory for that user. You should issue the adduser -m (username): this will create the user and create a home directory for him at the same time. Also, if you wanted to add them to a group, the adduser -m -G (groupname) (username) is all you need.

For normal production use

If you've had a chance to use Mac OS X, you'll notice that the user you create at install time is an Administrator. The Administrator user is endowed with great privileges, but is not Root. Root is more powerful than any other user, period.

I highly recommend that you log into your system with an underprivileged user account in a production environment, whether you're using Mac OS X or Linux, instead of these more powerful accounts. This will minimize any damage to the system should it get hacked someday, and it will minimize the amount of damage you or someone else can do through ignorance or carelessness.

Only log in as an Administrator or Root when it is absolutely necessary.

<this article available in a printer-friendly version>


Did you find this page helpful or enjoyable? If so, click here to support Low End Mac.
Discuss this article on our editorial message board

Recent Online Tech Journal Columns

Recent Content on Low End Mac

<back to Online Tech Journal>

LowEndMac Reader Specials

4 All Memory: Computer running slow? Speed it up with more RAM memory! We have great Mac memory, guaranteed compatibility, and FREE SHIPPING! Buy RAM at 4AllMemory.com today!

Memory To Go Special: Imac G5/ 1GB $192 512mb $80 | PowerBook G4 / iBook G4: 1GB $275, 512mb $97 | G5: 1GB kit $160, 2GB kit $384 | G4 PC133: 512mb $93 256mb $55 | Flat Imac/ Titanium: 512mb $105 256mb $55 | iBook 500 512mb $84 | 2.5" & 3.5" HARD DRIVES AVAILABLE

Download Typestyler, still the Ultimate Styling Tool for Internet, Print and Video Graphics. Works great in Classic with a Native OS X Version on the way. Free Tryout: www.typestyler.com

PowerMax: Great savings on new 15" G4/1.0-GHz Apple PowerBooks -- prices start at only $1549! Plus, you get a $100 RAM rebate, a free printer, a free ScreensavRZ laptop pad and more! Click or call 800-769-9065 today!

Other World Computing: Get a New Video Card for faster Frame Rates, Faster Screen Redraws, Dual Display Support, Etc! ATI Radeons from $119; Apple/Nvidia 64MB $139.

FastMac: Performance Upgrades Designed to Extend the Life of Your Current Mac. Easy to Install. Easy to Afford. Hard to Live Without. Painless Evolution. Click here.




Mac of the Day
 Power Mac 8100/110
List of the Day

 PCI PowerMacs
Book of the Day

 Macworld Mac OS 9 Bible

Channels
 Power Macs
 iMac Channel
 iBook/PowerBook
 MacInSchool
Computer Profiles
 iMac
 Power Mac
 PowerBook/iBook
 Performas
 Mac Clones
 Older Macs
 LisaNeXT
Editorial Archive
Mac Daniel's Advice
Email Lists
LEMchat (uses AIM)
Message Boards
Online Tech Journal
Consumer
 advice, reviews
 guides, deals
Software
Apple History
Best of the Web
 Best of the Mac Web surveys
Miscellaneous Links
 Best Used Mac Buys
 Used Mac Dealers
 Video Cards
 Mac OS X
 Mac Linux
 Macspeak
 RAM Upgrades
About Low End Mac
Site Contacts

Open Link

Support LEM

Affiliates
 Club Mac
 MacZone
 eBay
 CoolVCD
 123Inkjets.com
  Handspring
  Iomega

Advertise on LEM
Our advertising is handled by BackBeat Media. For detailed price quotes and advertising information, please contact
Greg Snyder at BackBeat Media (512-441-1852). This number is for advertising only.

Entire Low End Mac site copyright ©1997-2004 by Cobweb Publishing, Inc., unless otherwise noted. All rights reserved.
  Advice presented in good faith, but what works for one may not work for all.
  Please report errors to the webmaster.
  Email sent may be published at our discretion. Email addresses will not be published unless requested. If you prefer that your message not be published, mark it "not for publication." Letters may be edited for length, context, and to match house style.
  LINK POLICY: This site allows and encourages links to any public page, as long as the linked page does not appear within a frame that prevents bookmarking it.
  Access our news feed at http://lowendmac.com/rss.txt.
  PRIVACY POLICY: We don't collect personal information unless you explicitly provide it.
  Low End Mac is an independent publication and has not been authorized, sponsored, or otherwise approved by Apple Computer.
  Apple, the Apple logo, Macintosh, iBook, iMac, and PowerBook are registered trademarks of Apple Computer, Inc. Additional company and product names may be trademarks or registered trademarks and are hereby acknowledged.
  For more details, see our Terms of Use.