Hi
we are trying to automatically map network drives for our users, the share folder is the same name as the username.
In the past we were using the below script which has worked, but now we have upgraded our OS to Yosemite the script is no longer working properly.
Thanks for any help much appreciated.
we are trying to automatically map network drives for our users, the share folder is the same name as the username.
In the past we were using the below script which has worked, but now we have upgraded our OS to Yosemite the script is no longer working properly.
#!/bin/sh
/usr/bin/osascript > /dev/null << EOF
set myname to do shell script "whoami"
tell application "Finder"
try
do shell script "umount -a -f -t smbfs"
end try
try
do shell script "rm -f ~/Desktop/Idrive"
do shell script "rm -f ~/Desktop/public$"
end try
try
mount volume "smb://" & myname & "@fs1/" & myname
do shell script "ln -s /Volumes/" & myname & " ~/Desktop/IDrive"
end try
try
mount volume "smb://fs1/public$"
do shell script "ln -s /Volumes/public$ ~/Desktop"
end try
end tell
EOF
Thanks for any help much appreciated.