I'm trying to get a simple mount volume script to run when a user logs on to their macbook airs or iMacs. I write the script, then assign it in a policy to run on my test macbook on login. I'm not getting any drives mapped at all. I can cmd+k and type that in and it will map.
The way I've had to do this in our old MDM is actually use package maker and make a .pkg file out of the script and have it install into the applications folder and then have it execute the script when somebody logs in. I'm wanting to try and avoid it and my scripting knowledge is pretty limited when it comes to macs.
Is there any reason this wouldn't be working, or should I be doing something else?
The script is as follows
set str_username to (do shell script "whoami")
tell application "Finder"
mount volume "smb://staff.domain/home/" & str_username
mount volume "smb://domain/staff/staff shared data/District"
mount volume "smb://domain/staff/staff shared data/TS"
mount volume "smb://domain/staff/staff shared data/HS"
mount volume "smb://student.domain/home/TS"
end tell
Everything in the script has its own line. Not sure why it's all running together.