1. Home
  2. Electronics & Gadgets
  3. Computing Center

Windows, Mac, and Linux PCs on the Same Network

Enable the machines on your cross-platform network to access and share the same files and resources.

Contributing Editor Scott Spanbauer writes the monthly Internet Tips column. His byline first appeared in print in the November 1986 issue of Macworld.


Illustration by Steve Lyons
The vast majority of computers in the world's homes and offices run Windows. However, humankind does not live by Windows alone. Apple's killer combination of top-notch hardware and a secure, stable, feature-rich operating system in OS X has convinced many Windows users that the modern Macintosh is a superior system for various uses. And with its open-source underpinnings and seemingly endless array of free software, Linux is attracting the attention of more nongeeks.

Unfortunately, sharing files, printers, Internet connections, and other resources on machines running Windows, OS X, and Linux isn't always easy. The following tips will help you get these operating systems to play nicely with each other.

First, update your software. For example, early versions of Mac OS X (up to and including 10.2) let you connect to Windows files and printers, but only with major coaxing. Later versions of OS X use Windows' Server Message Block protocol to facilitate connecting to and sharing with non-Macintosh PCs. In several important ways, however, OS X's support for Windows' shared resources remains broken (find workarounds for OS X version 10.4.2--the most recent, at this writing--on the next page).

Like OS X, Linux supports Windows-style sharing through SMB. Though there are many versions of Linux with varied graphical interfaces, for this column I tested SuSE Linux 9.3 (the latest version) with the KDE 3.4 graphical environment. SuSE is one of the easiest Linux distributions to configure and use.

Tweak Your Share Settings

Windows: Sharing files and printers on Windows XP systems is disabled by default in Service Pack 2, but enabling this feature is pretty easy. Right-click My Network Places, choose Properties, right-click the network connection through which you want to share files, select Properties again, check File and Printer Sharing for Microsoft Networks, and click OK (see FIGURE 1


FIGURE 1: Set XP to share resources on the local network with a couple of clicks.

). Now your Windows XP system can share files and printers--all you have to do is tell it what to share.

To share a folder (and its files and subfolders) with other computers on the network, right-click it in Windows Explorer or any folder window, choose Sharing and Security, Sharing, and check Share this folder on the network. To allow people using other computers on the network to alter or delete the files, check Allow network users to change my files. Then click OK. To allow other computers on the network to use a printer connected to your PC, click Start, Printers and Faxes, right-click the printer (or fax modem) that you want to share, choose Sharing, select Share this printer, enter a name for the printer in the text box, and click OK.

Macintosh: To share your Mac's files and printers with other computers, launch Sharing in System Preferences, select Services, enter a descriptive name for the computer in the Computer Name field, and check Windows Sharing. To share your Mac's Public folders only with other Macintosh computers, check Personal File Sharing instead. If you'd like to specify the printers you want to share, open Print & Fax in System Preferences, check Share these printers with other computers, and select the appropriate printers.

OS X's default file-sharing security is tighter than Windows XP's. To connect to a shared file or printer, you need to enter the user name and password of an existing account on the OS X computer. If you are accessing your Mac's resources from a non-Mac PC, just use your usual OS X log-in from the non-Mac system. But if you're creating a share for others, you may prefer to protect your own account by creating a separate Mac account for them (click Accounts in System Preferences to do so). To enable Windows Sharing for a specific account, open Sharing in System Preferences, click Accounts, check the account you want to enable, enter its password, click OK, and then click Done.

If you recently upgraded to OS X 10.4 from an earlier version, Windows Sharing log-ins will fail until you reset the account password in System Preferences' Accounts settings.

Linux: To share files and printers in SuSE 9.3 with KDE 3.4, use the YAST configuration utility. Simply open the program, enter the root password when prompted, select Network Services in the left pane, and click Samba Server. After YAST detects your configuration, enable or disable your preferred shared resources (such as printers and home directories), click the Start Up tab, select On--Start Service when Booting, and click Finish. The next time you boot Linux, your file and printer shares will become available to other computers on the network.

Make the Connection

Windows: To connect to shared Windows files and printers from Windows XP, open My Network Places. The main window will display icons of any file shares you've connected to in the past; if you're networking for the first time, it won't show any. To see what network resources are available to you, click View workgroup computers and click a networked computer's icon to identify the shared resources it has to offer. The computer you're using will also appear there if it is configured to share files or printers. Once you see a shared folder, you should be able to open it as you would a local folder. If no computers appear, don't give up. See "Teach Your OS to Share" for some common solutions to this problem.

Connecting to a shared printer is similar: Open Printers and Faxes, and click Add a printer in the task pane on the left. Click Next to move to the Add Printer Wizard's 'Local or Network Printer' page. Select A network printer or printer attached to another computer, and click Next twice. Browse the network for printers (if none show up, see "Teach Your OS to Share" for tips on jump-starting your network connection). Select the printer you want to add, click Next, and work through the prompts to complete the installation.

Macintosh: If you want to browse Windows file shares via OS X 10.4, choose Go, Network in the Finder. Among the icons displayed in the Finder window should be one with the same name as your Windows workgroup. Double-click it to see the computers with file shares that are currently available on the network. Double-click an icon to display the computer's shared folders. OS X will ask you to enter a password to access the PC's shares, even if none is actually required--simply click OK to proceed. Next, from the pull-down list, select the shared folder you want to connect to (OS X refers to these as SMB/CIFS shares), and click OK. The share will now appear as a link in the Finder's sidebar--click it to display its files and subfolders (see FIGURE 2


FIGURE 2: Look for links in the Finder window after you have connected to shared Windows folders in OS X.

).

Accessing a shared Windows printer from your Mac requires a few more twists and turns. You should be able to browse to and configure OS X to use a shared Windows printer, but in my experience--and that of others--the Mac OS's graphical printer setup is broken. Based on my tests, the resulting printer connection consistently fails because the printer's address is botched. To fix a jumbled network printer address, click Applications, Utilities, Printer Setup Utility, select the affected printer from the list, click Show Info, and type the printer's correct network address in the location field.

Another way to connect to a shared Windows printer from a Mac is to launch System Preferences, double-click Print & Fax in the Hardware section, click the plus sign to launch the printer browser, press the <Option> key as you click the More Printers button, select Advanced from the pull-down list of printer types at the top of the next dialog box, and choose Windows Printer via SAMBA in the list that appears below it. Enter a descriptive name for the printer in the Device Name field, and then complete the Device URI: address using the format smb://user@workgroup/server/printer, where user is your user name, workgroup is the name of the workgroup the printer is shared on, server is the system sharing the computer, and printer is the shared printer (see FIGURE 3


FIGURE 3: Enter the address of the XP printer in OS X's Print & Fax preferences.

). Select the printer's manufacturer on the Printer Model pull-down list and its model name in the list that appears after that. Finally, click Add.

Linux: To view shared Windows folders in SuSE 9.3 with KDE 3.4, open the Network Browsing icon on the KDE desktop and select the SMB Shares icon in the Konqueror file manager window that opens. After a short delay, you should see icons for all of the Windows workgroups available on your local network. Open a workgroup icon to view the computers that have shares available. Open an individual computer icon to view its shared folders--it's just like browsing the network in Windows XP.

Unfortunately, the KDE Konqueror browser just doesn't talk properly to OS X 10.4's Windows shares. The workaround is to connect to the OS X share explicitly: Launch the Network Browsing link (or choose Go, Network Folders in Konqueror), click Add a Network Folder, select Microsoft Windows network drive, and click Next. Enter a name for the share connection in the Name field, the name of the Macintosh computer you want to connect to in the Server field, and the name of the folder the Mac is sharing in the Folder field (see FIGURE 4


FIGURE 4: Connecting a Linux system to a Macintosh's SMB shares requires that you enter the addresses by hand.

). Click Save & Connect; KDE will then prompt you to enter the share's OS X user name and password, after which it will create a link to the folder in the Network Browsing folder.

The process of connecting to a shared Macintosh printer from Linux is easier because both systems use the Common Unix Printing System. The shared Macintosh printer should show up automatically in your list of printers when you go to print in your Linux application.

OS Toolbox: Teach Your OS to Share

If file or printer sharing doesn't work on your network of Windows, Mac, and Linux PCs, there's likely a solution.

Check your firewall: Though most third-party PC firewalls (such as Zone Labs' free ZoneAlarm) allow other Windows systems on the network to share files and printers, they may block access to and from the network's non-Windows computers by default. If you can't connect to a Windows share from a Mac or Linux machine even though other Windows PCs on the LAN can, disable the firewall. If this does the trick, add the local addresses or PCs to the firewall's trusted zone or address range, and fire it up again.

Try another workgroup: The default workgroup name in XP is MSHOME, but in earlier versions of Windows and in Mac OS X the default is WORKGROUP. If a PC with a shared resource fails to show up in Explorer's list of workgroup computers, click the Up icon or select Microsoft Windows Network in the folder pane, and then click another available network (if any) to view its computers. To see all your shares, configure them (if possible) as members of the same workgroup.

Have patience: It can take several minutes for a new share to show up in another computer's network window. To connect to a share directly in WIndows, enter its path (such as \\computername\sharename) in Explorer's Address field.

Explore Computing Center

More from About.com

  1. Home
  2. Electronics & Gadgets
  3. Computing Center
  4. Internet & Networking
  5. Networking
  6. Home Networking
  7. Windows, Mac, and Linux PCs on the Same Network

©2008 About.com, a part of The New York Times Company.

All rights reserved.