[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [o-info] Re: [ccp4bb]: Mac OSX file system



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***

To summarize: yes there is a smoother (in my humble opinion) and "easier"
way to mount smbfs shares.

To elaborate...

Automount only works with NFS mounts. These can be done via NetInfo Manager.
NFS exports are also done from NetInfo Manager. The beauty of NetInfo is
that it can be used as the OSX NIS. NetInfo mounts, however, only use
automount, which, as we know, only uses NFS.

Chris, on the other hand, is using smbfs, aka "Samba". Samba has many
advantages over NFS, such as encryption and the ability to recover a mount
if a file system server goes down. This latter ability is one that you also
get when using automount to manage your NFS mounts. Samba is also good for
"heterogenous" networks--i.e. those with both unix (OSX, SGI, DEC, Linux,
etc.) and windows (Windoze) machines. Samba, however, takes a bit more
configuration than NFS to get permissions working well...but this also means
it is a bit more configurable.

A smoother way than having every user call the mount_smbfs command every
time they want to run a program, is to mount it at startup. OSX has many BSD
type implementations, including the "rc" boot script hierarchy at startup.
However, Apple has extended this rc system with its "SystemStarter" program
that is called from a rc script somewhere. SystemStarter looks through the
directory /Library/StartupItems for any subdirectories. Inside of these
directories, should be executable files as the same name as their containing
directory. Also in these directories is a specialized file called,
descriptively, StartupParameters.plist. Here is a picture of mine as an
example:

/Library/
   StartupItems/
     Firewall/
       Firewall*
       StartupParameters.plist
     RetroRun/
       RetroRun*
       StartupParameters.plist
     SMB_Mounts/
       SMB_Mounts*
       StartupParameters.plist

You may have already guessed that my SMB_Mounts directory mounts my smb
(smbfs, "Samba") file systems.

My SMB_Mounts executable looks something like this (dashed lines not
included):
----------------
#! /bin/sh

/sbin/mount_smbfs -T 10 //username:password@sultan/chen1 /chen1
/sbin/mount_smbfs -T 10 //username:password@osmic/chen2 /chen2
----------------

The "StartupParameters.plist" file is essential for this setup. It should be
a verbatim copy of everything between the dashed lines:
----------------
{
  Description     = "Mounts SMB Shares From Local Shares";
  Provides = () ;
  Requires = ("NetInfo") ;
  OrderPreference = "None";
  Messages =
  {
    start = "Starting SMB Automounts";
    stop  = "Stopping SMB Automounts";
  };
}
----------------

Don't play with the "StartupParameters.plist" file unless you know what you
are doing. An improper configuration can render your OSX system unbootable.

Presumably, this can also be done with hashed passwords that sit in the root
home by using the -N option and leaving ":password" out. This is a little
more secure than using the username:password combo. Read the friendly
manpage for mount_smbfs for details.

For the smoothest of the smooth OSX users among us: you may be able to set
up a NetInfo domain to handle you Samba shares. When you do this, please
tell the rest of us.

James


On 4/24/02 11:58 AM, "Chris Waddling" <waddling@msg.ucsf.edu> wrote:

> ***  For details on how to be removed from this list visit the  ***
> ***          CCP4 home page http://www.ccp4.ac.uk         ***
> 
> Automounting a remote disk is something I've had trouble with in OSX, and
> judging by the OSX discussion pages, I'm not alone.  I don't think it's as
> seamless as one would hope.  Believe it or not, this is the only way I've
> seen in the discussions on how to automount a remote disk on startup.  If
> anyone has another (easier) way to do it, I'm all ears.
> 
> Chris


--------------------------------------------------------
"Research: If it worked the first time,
they would just call it 'search'."     -Roy Garcia
--------------------------------------------------------
 James C. Stroud
 Department of Chemistry and Biochemistry
 University of Colorado at Boulder
 Boulder, CO 80309

 Tel: 303-492-4503      Fax: 303-735-1347
--------------------------------------------------------