OK, I've reached max-frustration level with macos and network drives. If ANYONE has ideas or solutions PLEASE comment.
/etc/fstab mounting an nfs remote drive works for mounting, but I've found NO WAY to umount the drive. 'umount /mountpoint' simply does no work. Clearly a bug.
Switching to mount_smbfs ... the following works, sort of:
mount_smbfs //user@server/share /mountpoint
This mounts and can be unmounted. The problem here is that it will prompt for a password; not useful in a cronscript. Even so, doing:
mount_smbfs //user:password%@server/share /mountpoint
fails with special characters in the password (like the shown '%'), and I've found absolutely no way to escape it.
Trying 'mount_smbfs -N //user@server/share /mountpoint' with ~/Library/Preferences/nsbm.conf set to:
[default]
minauth=kerberos
doesn't work either. Nor does using the domain parameter: '//domain;user@server ...' Strange, since Macos seems to support domain authentication (i.e. no prompting for password) from GUI Command-K or Preferences > Users & Groups > Login Options.
doing: 'mount -o user=userid -t smbfs ...' doesn't work as the user or username option is not supported.
Is there any way at all to do what I want? Which is: mount an nfs or cifs or smbfs network drive from the command line (cron/scheduled process), without keyboard interaction, and be able to unmount it sometime later. [U]nixes have been able to do this for decades. Surely Macos can. I'll be happy to use a macos specific tool if that will work.