I wrote the following HOW-TO on accessing Windows shares under OS X, hope it helps some of you guys out!
Feedback is welcome...let me know how it works out...
-Nathan Odle
nathano@odle-associates.com
-------------
HOW-TO: Sharity on Mac OS X
Maintainer: Nathan Odle, nathano@odle-associates.com
For all of you that think that Samba will solve your SMB-mounting troubles, you'll be disappointed to hear that it won't. Don't confuse sharing with mounting though - if you want to create SMB (Windows)-compatible shares, it's Samba you want. However, if you want to mount other systems' shares into the OS X filesystem, you need a little application called Sharity, by Objective Development (http://www.obdev.at/Products/Sharity.html). The reason Samba won't work for this is that the distribution is lacking a little program called SMBFS (a.k.a. "smbmount") that comes ONLY on the Linux distribution. SMBFS development is completely seperate from the Samba effort, and was developed for Linux. Someone is working on a *BSD port, but compilation fails under OS X Public Beta.
So, we're left with Sharity. Sharity mimics the behaviour of SMBFS, giving you a "daemon" (Mac users - think "extension") and command-line utilities to mount, unmount, browse, etc. Most importantly, the most recent (2.4Beta4) release supports Mac OS X Server, and appears to work under the OS X Public Beta as well. Although Sharity is a commercial product, free licenses are available for those associated with academic institutions. At the end of this document, there will be a description of how to obtain licensing and how to set it up once you have your key. This is important, because without a valid license key, you are limited to how deep you can go in the file system hierarchy. It's also good karma
In order to get Sharity running, the first thing you'll want to do is visit the Sharity website and download the most current binary release for OS X to your desktop (important - these directions assume that you're downloading to the desktop - anything else, and YMMV...Your Mileage May Vary). As of this writing, it was available at the following link:
http://www.obdev.at/ftp/pub/Products/Sharity/binaries/Sharity.2.4Beta4.MacOSX-DP3.tgz
While you're at it, grab the Sharity "StartupParameters.plist" file I've created (for use in getting Sharity to run at startup) at:
http://www.cf.missouri.edu/howto/StartupParameters.plist
IF USING INTERNET EXPLORER, MAKE SURE TO HOLD THE CONTROL KEY AS YOU CLICK THE LINK, SELECT "Download Link to Disk", AND SELECT YOUR DESKTOP AS THE DESTINATION WHEN THE OPEN DIALOG POPS UP.
Next, you'll need to start Terminal and install/configure Sharity. Remember: All examples here will assume that you downloaded it to your desktop! If you did otherwise, you'll have to be clever and change the paths. Here's the step-by-step, things you have to type are in bold:
1) Start the Terminal program. From a Finder window browse to Applications, then to the Utilities folder contained within. Double-click on the icon marked Terminal.
2) The Terminal shell will start in your home directory. Issue the following command (note the difference between "/" and "\", and make sure you realize all of this IS CASE SENSITIVE):
cd Library/Desktop
3) Now, we need to "untar" (uncompress) the file:
tar -zxvf Sharity.2.4Beta4.MacOSX-DP3.tar.gz
4) This created a directory on our desktop called "Sharity.2.4Beta4.MacOSX-DP3-G3". We will change to this directory:
cd Sharity.2.4Beta4.MacOSX-DP3-G3
5) Next, we need to become the user "root" so that we have sufficient privleges to install Sharity. When prompted for the password, use the same password as the administrator user you setup when you installed OS X:
su
6) Now, we run the setup script. (make sure you use the "." in "./setup"):
./setup
7) Answer the questions according to the defaults (to use the default, just press "return") except for two items. The first item is the WINS server configuration. If you have a WINS server you should give that information to Sharity. The second item is where it asks for your workgroup name. There, you should enter your network's workgroup name. Once you've answered all the questions, Sharity will configure itself, and copy the files to the correct locations.
8) Now, we need to make sure the Sharity daemon (sharityd) runs at startup. In order to do this, we need to create a new directory bundle in the StartupItems folder that tells OS X how to load Sharity:
First, we move up one directory to get us back on the desktop.
cd ..
Next, we make a new directory in StartupItems for Sharity.
mkdir /System/Library/StartupItems/Sharity
Now we move the StartupParameters.plist file that we downloaded earlier from the desktop to our new directory.
mv StartupParameters.plist /System/Library/StartupItems/Sharity
Finally, we make a symbolic link to sharity.init in our new directory.
ln -s /usr/local/sharity/sbin/sharity.init /System/Library/StartupItems/Sharity
9) Now that we've got the Sharity daemon ready to go at startup, we need to restart the machine and make sure it's working. So, go ahead and restart.
10) To test that Sharity is up and running, we can use the ProcessViewer application that's in the same place we found Terminal. If you start ProcessViewer you'll see in the process list an item called "sharityd" if all went well. Another way we can do this is to leverage a couple command-line utilities called ps (shows the process list) and grep (finds a pattern in it's input and outputs the line containing the pattern). We "pipe" the output from ps to the input of grep using the "|" character (that's SHIFT - \). So, start Terminal as in Step 1 and type the following at the command line:
ps ax | grep sharityd
If all went well, you'll see something similar to the following, otherwise you won't see anything at all:
207 S s 0:05.87 sharityd
You can try using just the ps ax command by itself if you want to see a list of all the processes running on the system. You'll notice that grep pulled out the line with "sharityd" in it for us.
If everything looks good, CONGRATULATIONS! You're ready to use Sharity to mount and manage SMB (a.k.a. CIFS - "Common Internet FileSystem") shares. In addition, the OS X distribution comes with a GUI. As of the time of this writing it would not run under the Public Beta, but I've been in contact with Christian Starkjohann of Objective Development and he sent me a recompiled version that seems to be working fine. Details on how to obtain the updated GUI (Sharity.app) will be forthcoming
One nice thing that Sharity did for us when it started up was create a special directory that will act like the "Network Neighborhood" under Windows; that is, when you open it you'll see a listing of machines, open a machine, you see a list of shares, etc. To get there, we can open the Finder and browse to "Computer", and from there browse to "Network". Inside, you'll see an alias to "CIFS". Open it up, and Voila! There's your workgroup!
NOTE: If you open a server and do not see its shares, then you need to login to it with the appropriate username and password. Go to the Terminal once again, and issue the following command, replacing servername, username, and password with the proper information:
cifslogin servername -U username -P password
SPECIAL NOTE: Licensing Sharity
Sharity is crippled unless you register it with Objective Development. To obtain full-functionality, you need to get a license key and apply it to Sharity. Again, here's the step-by-step:
1) Go to the Sharity price and ordering page at: http://www.obdev.at/Products/SharityPrice.html. Here, you can order a license if it's for commercial use, or apply for a free Sharity Academic license. Follow the directions to obtain your license key. If it's an academic license, you will have to wait a couple days for them to verify your academic status and email your license key.
2) Once you have the license key, you'll need to apply it to Sharity. Start Terminal as you did before to install Sharity. Then enter the following command, replacing key with the license key you obtained (you may have to become the user "root" as you did before to install Sharity):
/usr/local/sharity/bin/cifslicense key
There you go!
References:
Objective Development - Creators of Sharity
http://www.obdev.at/Products/Sharity.html
Wilfredo Sanchez - worked on creating the new startup scheme for OS X. A mailing list message describing his work can be found here: http://lists.openresources.com/NetBSD/tech-userlevel/msg01303.html
[Edited by n8 on 09-29-2000 at 04:30 PM]
Feedback is welcome...let me know how it works out...
-Nathan Odle
nathano@odle-associates.com
-------------
HOW-TO: Sharity on Mac OS X
Maintainer: Nathan Odle, nathano@odle-associates.com
For all of you that think that Samba will solve your SMB-mounting troubles, you'll be disappointed to hear that it won't. Don't confuse sharing with mounting though - if you want to create SMB (Windows)-compatible shares, it's Samba you want. However, if you want to mount other systems' shares into the OS X filesystem, you need a little application called Sharity, by Objective Development (http://www.obdev.at/Products/Sharity.html). The reason Samba won't work for this is that the distribution is lacking a little program called SMBFS (a.k.a. "smbmount") that comes ONLY on the Linux distribution. SMBFS development is completely seperate from the Samba effort, and was developed for Linux. Someone is working on a *BSD port, but compilation fails under OS X Public Beta.
So, we're left with Sharity. Sharity mimics the behaviour of SMBFS, giving you a "daemon" (Mac users - think "extension") and command-line utilities to mount, unmount, browse, etc. Most importantly, the most recent (2.4Beta4) release supports Mac OS X Server, and appears to work under the OS X Public Beta as well. Although Sharity is a commercial product, free licenses are available for those associated with academic institutions. At the end of this document, there will be a description of how to obtain licensing and how to set it up once you have your key. This is important, because without a valid license key, you are limited to how deep you can go in the file system hierarchy. It's also good karma
In order to get Sharity running, the first thing you'll want to do is visit the Sharity website and download the most current binary release for OS X to your desktop (important - these directions assume that you're downloading to the desktop - anything else, and YMMV...Your Mileage May Vary). As of this writing, it was available at the following link:
http://www.obdev.at/ftp/pub/Products/Sharity/binaries/Sharity.2.4Beta4.MacOSX-DP3.tgz
While you're at it, grab the Sharity "StartupParameters.plist" file I've created (for use in getting Sharity to run at startup) at:
http://www.cf.missouri.edu/howto/StartupParameters.plist
IF USING INTERNET EXPLORER, MAKE SURE TO HOLD THE CONTROL KEY AS YOU CLICK THE LINK, SELECT "Download Link to Disk", AND SELECT YOUR DESKTOP AS THE DESTINATION WHEN THE OPEN DIALOG POPS UP.
Next, you'll need to start Terminal and install/configure Sharity. Remember: All examples here will assume that you downloaded it to your desktop! If you did otherwise, you'll have to be clever and change the paths. Here's the step-by-step, things you have to type are in bold:
1) Start the Terminal program. From a Finder window browse to Applications, then to the Utilities folder contained within. Double-click on the icon marked Terminal.
2) The Terminal shell will start in your home directory. Issue the following command (note the difference between "/" and "\", and make sure you realize all of this IS CASE SENSITIVE):
cd Library/Desktop
3) Now, we need to "untar" (uncompress) the file:
tar -zxvf Sharity.2.4Beta4.MacOSX-DP3.tar.gz
4) This created a directory on our desktop called "Sharity.2.4Beta4.MacOSX-DP3-G3". We will change to this directory:
cd Sharity.2.4Beta4.MacOSX-DP3-G3
5) Next, we need to become the user "root" so that we have sufficient privleges to install Sharity. When prompted for the password, use the same password as the administrator user you setup when you installed OS X:
su
6) Now, we run the setup script. (make sure you use the "." in "./setup"):
./setup
7) Answer the questions according to the defaults (to use the default, just press "return") except for two items. The first item is the WINS server configuration. If you have a WINS server you should give that information to Sharity. The second item is where it asks for your workgroup name. There, you should enter your network's workgroup name. Once you've answered all the questions, Sharity will configure itself, and copy the files to the correct locations.
8) Now, we need to make sure the Sharity daemon (sharityd) runs at startup. In order to do this, we need to create a new directory bundle in the StartupItems folder that tells OS X how to load Sharity:
First, we move up one directory to get us back on the desktop.
cd ..
Next, we make a new directory in StartupItems for Sharity.
mkdir /System/Library/StartupItems/Sharity
Now we move the StartupParameters.plist file that we downloaded earlier from the desktop to our new directory.
mv StartupParameters.plist /System/Library/StartupItems/Sharity
Finally, we make a symbolic link to sharity.init in our new directory.
ln -s /usr/local/sharity/sbin/sharity.init /System/Library/StartupItems/Sharity
9) Now that we've got the Sharity daemon ready to go at startup, we need to restart the machine and make sure it's working. So, go ahead and restart.
10) To test that Sharity is up and running, we can use the ProcessViewer application that's in the same place we found Terminal. If you start ProcessViewer you'll see in the process list an item called "sharityd" if all went well. Another way we can do this is to leverage a couple command-line utilities called ps (shows the process list) and grep (finds a pattern in it's input and outputs the line containing the pattern). We "pipe" the output from ps to the input of grep using the "|" character (that's SHIFT - \). So, start Terminal as in Step 1 and type the following at the command line:
ps ax | grep sharityd
If all went well, you'll see something similar to the following, otherwise you won't see anything at all:
207 S s 0:05.87 sharityd
You can try using just the ps ax command by itself if you want to see a list of all the processes running on the system. You'll notice that grep pulled out the line with "sharityd" in it for us.
If everything looks good, CONGRATULATIONS! You're ready to use Sharity to mount and manage SMB (a.k.a. CIFS - "Common Internet FileSystem") shares. In addition, the OS X distribution comes with a GUI. As of the time of this writing it would not run under the Public Beta, but I've been in contact with Christian Starkjohann of Objective Development and he sent me a recompiled version that seems to be working fine. Details on how to obtain the updated GUI (Sharity.app) will be forthcoming
One nice thing that Sharity did for us when it started up was create a special directory that will act like the "Network Neighborhood" under Windows; that is, when you open it you'll see a listing of machines, open a machine, you see a list of shares, etc. To get there, we can open the Finder and browse to "Computer", and from there browse to "Network". Inside, you'll see an alias to "CIFS". Open it up, and Voila! There's your workgroup!
NOTE: If you open a server and do not see its shares, then you need to login to it with the appropriate username and password. Go to the Terminal once again, and issue the following command, replacing servername, username, and password with the proper information:
cifslogin servername -U username -P password
SPECIAL NOTE: Licensing Sharity
Sharity is crippled unless you register it with Objective Development. To obtain full-functionality, you need to get a license key and apply it to Sharity. Again, here's the step-by-step:
1) Go to the Sharity price and ordering page at: http://www.obdev.at/Products/SharityPrice.html. Here, you can order a license if it's for commercial use, or apply for a free Sharity Academic license. Follow the directions to obtain your license key. If it's an academic license, you will have to wait a couple days for them to verify your academic status and email your license key.
2) Once you have the license key, you'll need to apply it to Sharity. Start Terminal as you did before to install Sharity. Then enter the following command, replacing key with the license key you obtained (you may have to become the user "root" as you did before to install Sharity):
/usr/local/sharity/bin/cifslicense key
There you go!
References:
Objective Development - Creators of Sharity
http://www.obdev.at/Products/Sharity.html
Wilfredo Sanchez - worked on creating the new startup scheme for OS X. A mailing list message describing his work can be found here: http://lists.openresources.com/NetBSD/tech-userlevel/msg01303.html
[Edited by n8 on 09-29-2000 at 04:30 PM]