Posted on 06-03-2018 12:50 AM
Hi i am using a shareconnect script by david ackland to mount smb shares, the script runs ok and i am testing with a smb test share, i am not using AD to authenticate just the users local login
the script runs i get the authentication window i put in the credentials and it looks like it should work but it does not mount the share on the desktop
if i manually do it using connect to server it works ok does anyone have any ideas
he has a youtube video and i have followed it as instructed
username="$3"
if [ -z "$username" ]; then # Checks if the variable is empty (user running script from Self Service)
username="$USER"
fi
echo "User: $username"
protocol="$4" # This is the protocol to connect with (afp | smb)
echo "Protocol: $4"
serverName="$5" # This is the address of the server, e.g. my.fileserver.com
echo "Server: $5"
shareName="$6" # This is the name of the share to mount
echo "Sharename: $6"
group="$7" # This is the name of the group the user needs to be a member of to mount the share
echo "Group: $7"
groupCheck=dseditgroup -o checkmember -m $username "$group" | grep -c "yes"
if [ "${groupCheck}" -ne 1 ]; then
exit 1
fi
mount_script=`/usr/bin/osascript > /dev/null << EOT
tell application "Finder"
activate
mount volume "$protocol://${serverName}/${shareName}"
end tell
EOT`
exit 0