AppleShare (or why doesn't macosx work like *nix)


I have been trying to use macosx like a real unix operating system. I am coming to terms with netinfo stuff (very anoying) but somethings just don't seem to work the same.

I have set up my macosx box with multiple users and i try and do all my work remotely via ssh as a privlidged user. The user that actually sits at the mac is a non privlidged user. I have written some cgi's that perform copy's between a AppleShare volume and a NFS volume.

Setting up the mounts for NFS seems to work nicely (although i haven't worked out how to mount automatically at boot). AppleShare mounts seem not to work most of the time. I am using the command

mkdir /Volumes/Audio\ HD
mount_afp afp://name:pass@anothermacshostname/Audio\ HD /Volumes/Audio\ HD

This seems to work rarely. Why?!?!!? even when done as root this doesn't work. But ocassionally it will work.

The non privlidged user can go through the finder and mount a (different) volume on this machine and it works first time everytime. If they have done this before i have done my mount from the CLI then i have no chance of getting my mount to work.

Any suggestions?



I can't help with the AFP stuff, sorry.

But if you want to get NFS mounts done at boot time, you need to configure them with NetInfo. OS X will honor an /etc/fstab file for physical mounts, hds and sds, but NFS and AFP mount-at-boots need to be defined in NetInfo.

Create a new subdirectory in /mounts with the following property->value pairs:

name -> remotehost:/remote/path/to/mount
type -> nfs (or afs, or whatever)
dir -> /local/path/to/mount

You'll have to reboot to see the mount, restarting the NetInfo daemons doesn't seem to mount the remote filesystem.

For more information, check out:
% man 5 netinfo
for more information on the netinfo database format, and acceptable and expected properties and values.


% man lookupd
for info on when the system will use flat files, nis, netinfo, ldap etc for finding names.