Top Page

thardman [at] thomashardman.com

UNIX® and Unix-like Operating Systems

Sharing and SMB

Data and services sharing are some of the most useful features of modern computers. Networked computers are not particularly new, though the standardization of local-area networks around the model of ethernet and Transmission Control Protocol/Internet Protocol ("TCP/IP") is a fairly recent development.

Previous models of local-area networking included such things as AppleTalk for Macintosh computers, or the Novell networking software for Microsoft operating system PCs. In recent years, Microsoft operating systems implimented the Short Message Block ("SMB") protocol for sharing files, directories and services. Most modern Unix-like operating systems can interact -- through their own implimentation of the SMB protocol -- with Microsoft operating system SMB services.

UNIX-like operating systems have their own rather elderly but effective means for sharing with each other their files, devices, and services. Generally, single files could be transferred by the File Transfer Protocol ("FTP"), and more recently by HyperText Transmission Protocol ("HTTP") or "web serving protocol". Entire hard disk drives, or even RAID arrays, or any part thereof, could be shared with Network File System ("NFS") protocol. Printers could be shared with the LPD ("line printer daemon") protocol. Other devices could be shared in a variety of ways, mostly through specialized software written especially for a particular machine and interface. While this last approach generally meant employment security for software engineers, that isn't an efficient process for deploying a facility across an entire industrial economy.

Microsoft's SMB model was the most widely deployed, due to their massive share of the business community's use of computers, and everyone else had to adapt. For Unix-like operating systems, variations on "Samba" deal quite well with SMB.


Access a Windows Printer from your Mac

A rather detailed and complete article on sharing files and printers between an OSX Mac and a PC running windows is available from Apple.

Comparable information is available from Microsoft.

To share a printer from a PC to a Mac running OSX "Tiger" operating system software, go to the PC and get administrator privileges. Then open the Control Panel, and select the Printers control-panel. When the control-panel opens and detects the printer(s), select the one you want to share. Click the right mouse key, and a menu will appear, and one of the items will deal with Sharing. Choose that and use common sense to complete the dialog.

While you are sitting there at the PC, create a folder called 'Sharing_Folder". Right-click on it, and select the Sharing dialog from the menu that will appear. Use common sense to share it to the network.

While you're there, open up the control-panel for System. Find out the machine's network name. It's probably something like "Joe's Computer" or "ZVXED821" or something similar. Also, on the bottom right of the screen is a tiny icon that looks like two computer screens. That's the notification icon for the ethernet networking. Right-click on that and select "Status" from the pop-up menu. When the dialog appears, click "Support" and you can learn the local IP address for that machine. It's probably something like "192.168.1.4" or something similar.

Log on to the Mac and open the System Preferences application. It's an icon on the Dock that looks like a light switch. Also open up a Finder window, if one's not already open.

In the Control Panel, select "Sharing". You must activate "Windows Sharing". Probably you also want to activate "Personal File Sharing" and "Personal Web Sharing" (this will turn on the web server so you can serve web pages). Also turn on "Remote login".

Go back to the main screen of the Control Panel. Select "Printers and Faxes" and push the button marked with the "plus" sign. This will launch the Printer Setup Utility.

In the Printer Setup Utility, press the button labelled "Add". That will open the Printer Browser window. Press "More Printers", and that will open another window. Select the drop-down button at the top, which is probably labelled "Appletalk". Choose "Windows Printing". The drop-down right below the first one will probably change to "Workgroup". You want to select that and change it to "Network Neighborhood". When a new printer appears, select it and press "Choose". You will probably see the screen change once again, and you will select again, and eventually you will be prompted for a user name and a password. Those are a name and password for the Windows PC, not for the Mac. Once you have passed authentication, you will be given a list of printers shared from that machine. Pick one, press "Choose". The Printer Browser window will go away, and you can quit out of the Printer Setup Utility. If you go to the Printers and Faxes pane in the System Preferences window, you will see the Windows Shared Printer, and you can send print jobs to it from your Mac.


Accessing a Windows Shared Folder from your Mac

This assumes you have already set a folder on a Windows PC to be shared over the network. That shared folder must have both read and write permissions. In the Windows Sharing dialog, you have to check the box that says "Allow network users to alter my files".

Click once on a Finder window or on the desktop, to get the Finder Menu to appear at the top of the Mac screen. Under the menu item "Go", find "Connect to Server". You will get a dialog box that says "Connect to Server" and asks for the server address. Enter something like "smb://192.168.1.4" (substituting the correct IP address for that machine). It's important to enter the part with "smb://" because that will tell your Mac that this is to be done with the SMB protocol that Windows PCs use to share files, directories, and services.

Press the "Connect" button. You will get another dialog. It will probably indicate the workgroup correctly. Give it the name you want to use, and the password. The first time you connect to any machine, it will ask you what username and password you want to use to identify yourself to that machine. Subsequent connections must use that name and password, which do not necessarily have to match an account that already exists on that machine.

After you pass authentication, you will have a new window on your desktop. That window will show you the contents of the shared directory on the Windows machine. You can read from it, and write to it.

If you enable it, you can share specific folders from your Mac to other Macs, or to Windows machines, or to other Unix-like operating systems, via the SMB protocol.

Information about setting up SMB services for Unix-like operating systems which don't already have it is outside the scope of this document. However, the SAMBA Project website has free software and lots of information about how to do this.


Why?

Why would you want to mount Windows folders to your Mac?

If you have a lot of storage space on your local hard disk drives, Windows machines could do backups of their systems, and store those in their shared folders. You could copy them from those shared folders onto your Mac. You could possibly even have a script do this, working in cooperation with interval-driven backup processes on the Windows machines. This is actually fairly common practice, and there is free software and instruction at AMANDA.org.

Why would you want to let Windows machines mount directories from your Mac?

This might be a faster alternative for a backup solution. Also, you might have clients that work from Windows PCs and also occasionally from your machine. In this last case, probably you would want to go to the "Accounts" dialog in the System Preferences application, and add user accounts. Be sure to give such accounts hard-to-crack passwords or you could expose your machine to damage. If those users no longer need access to the machine, probably you should disable those accounts. Under no circumstances remove the root/superuser account, or you will destroy the machine's ability to function.

Why would you want to send your print jobs to a Windows machine? Why not just get your own printer?

Frequently, older Windows machines are re-purposed rather than being discarded. Often they will be given a new and very large harddrive or harddrives, and the most up-to-date operating system that can be supported by the hardware will be installed. Yet compared to a new machine, they may be rather slow and be lacking in hardware features that make for a good personal machine or professional desktop machine. They can remain very useful, however, as file servers, backup servers, or print servers. None of those tasks require a great deal of speed. Users of other machines can be given individual accounts on these older machines, and they can store backups of their individual machines on the backup server, which can also be their extra storage file server, and they can send their print jobs to it rather than occupying the resources and processing power of their own machine. This is generally a good policy and can both save on costs of new hardware purchases and also effectively promote a policy of recycling.