My goal is to have users open a share via Self Service and all the digging I have done on JAMFnation point to it being pretty easy but I'm running in to road blocks. I've been fighting this off and on for a couple of weeks and need to lean on the Nation for some help! Shares in question are AFP shares, users must auth to them via their AD credentials which get passed upon logon to the computer. I tried the script from @franton][/url (thank you sir, its been very helpful) https://github.com/franton/Mount-Network-Share but I get an error "unknown user: /usr/sbin/jamf". Can anyone see my error or recommend an alternative way to accomplish this? My code is below:
#!/bin/bash
# Script to mount a specified server and share For Sedna Shares.
# This should use the AD credentials to log in.
# Author :r.purves@arts.ac.uk
# Version 1.0 : 03-27-2014 - Initial Version
# Parameters needed are as follows:
# 3 - Current username (supplied by Casper so we don't worry about this one)
# 4 - Server FQDN address
# 5 - Sharename
# 6 - Share type
# Check to see if the parameters have been populated properly and fail if not.
if [ "$4" == "plexmini.sch.org" ]; then
echo "Error: Missing server name in policy. e.g. inf-server.arts.local"
exit 1
fi
if [ "$5" == "PodCast" ]; then
echo "Error: Missing share name in policy."
exit 1
fi
if [ "$6" == "afp" ]; then
echo "Error: Missing share type in policy. Valid types currently are: afp / smb"
exit 1
fi
# All done, finally mount the share
sudo -u $3 /usr/sbin/jamf mount -server $4 -share $5 -type $6
