Administration Guide : Administration from the Unix command-line : Using the UNIX command-line for mounting Mac AppleShare volumes from a UNIX system

Using the UNIX command-line for mounting Mac AppleShare volumes from a UNIX system
AppleShare software and hardware requirements
Before you can use , every Macintosh you wish to mount must have Apple’s AppleShare workstation software installed. (Apple ships a copy of AppleShare with every Macintosh.) Macintoshes can be on a LocalTalk network connected to the Ethernet by a gateway or directly connected to the local network.
Setting AppleShare permissions on Macintoshes
Before you can look at Macintosh files from a Unix system, you need to set Macintosh AppleShare permissions appropriately. The basic steps which need to be performed on each Macintosh where a Unix user wants to have access to files include:
1.
2.
3.
Setting up mounts
When you mount volumes on a Macintosh, they appear on the desktop for the Macintosh user to manipulate. A Unix system, however, has a complex, multilevel file system rather than a desktop.
Xinet provides two tools for setting up mounts from the command-line:
configkfs(1M), a configuration program for those more comfortable working at the Unix command-line level
mount_kfs(1M), an AppleShare mounting program (Because choosing the correct arguments to initially mount a volume this way is somewhat complex, this method is generally only useful for remounting volumes previously set up using the Xinet Configuration GUI or configkfs(1M).)
Setting up and configuring mounts with configkfs(1M)
If you cannot use the AFP Mounter GUI for some reason, the configkfs(1M) program provides similar functionality. The following steps describe how to use it. You must be logged in as root.
1.
Run configkfs(1M):
# configkfs
2.
The configkfs(1M) program will check for all AppleShare servers on the network and ask whether or not you want to mount them. If you answer n the server will not be accessed and the program will go on to inquire about the next server, as in this example:
Do you want to mount a volume from: “Joe’s Mac” in zone “xinet” (y/n)? n
If you answer y configkfs(1M) will ask for a valid user and password on the remote machine before mounting volumes. (You can log in as any user who has been set up as a valid user on the particular Macintosh. In some cases you may also be allowed to log in as guest.) Here’s an example:
Do you want to mount a volume from: “Ancient Mac II” in zone “xinet” (y/n)? y
Remote user name[root]: joe
Password required for joe
Password:
3.
Would you like to mount volume Freak o’ Nature from Ancient Mac II? y
Mount point []: /mount/freak
Mounting Ancient Mac II@Freak o’ Nature.
4.
The configuration program will ask if you want to store the mount information for each volume you mount. (If you answer n, you will have to rerun configkfs(1M) to remount the volume for future sessions.)
Would you like to store the mount information
in the /etc/fstab for later reference? (y/n) y
In the future, you can remount the volume by typing “/etc/mount /mount/freak”
5.
If you choose to store mount information, the configuration program will also ask whether you want to save the password. If you answer y, an encrypted copy of the password will be stored in /etc/fstab so that in the future, you will not have to supply a password when you remount the volume.
6.
# ls /mount/freak
:03:02:01Move&Rename/ Photoshop/
AppleShare PDS System 6.04/
Applications/ System Folder/
Desktop TeachText
Desktop DB
This is a very long name
Desktop DF Trash/
Desktop Folder/ Utilities/
MPW/ testvol/
MPW.Console-11
There will also be a mount entry of type kfs for the device in /etc/fstab, for example:

# cat /etc/fstab

/dev/root/                                         /          efs
rw,raw=/dev/rroot                                  0          0
/dev/usr                                           /usr       efs
rw,raw=/dev/rusr                                   0          0
Ancient_Mac_II:/Freak_’o_Nature                       /mount/om   kfs
noauto,rw,soft,user=joe,zone=xinet                    0           0
Unmounting volumes
You may unmount any previously mounted volume with the umount(1M) or umount_kfs(1M) command, for example:
On IRIX systems:

# umount /mount/freak
See umount(1M) or umount_kfs(1M) for details.
Remounting volumes
1.
Use the mount(1M) command (without arguments) to check which volumes are currently mounted. For example:
# mount
/dev/root on / type efs (rw,raw=/dev/rroot)
/dev/usr on /usr type efs (rw,raw=/dev/rusr)
2.
If the volume you are interested in has been previously configured with configkfs(1M), but isn’t currently mounted, issue the command:
On IRIX:
# mount filesystem_name
where filesystem_name is the name of the AppleShare volume you want to mount, for example:

# mount_kfs /mount/freak
Mounting Ancient Mac II@Freak o’Nature.
3.
Password required for joe
Password: