Hello,
I have been trying for some time to configure a script that will mount network drives for a user when they log into their Mac. I have been all over JamfNation and have read many of other users posts to try to get this to work in my environment. I have successfully created an AppleScript when launched manually on the Mac will auto mount network drives but I am having issues making this automated and being able to push this to multiple devices.
I learned really quick that when you push scripts and packages through Casper, Casper will run them as root and I need this to run as the user for this to work. I have attempted to try LaunchAgents but for what ever reason that is not working for me as well. If someone could point out what I am doing wrong, that would be very helpful and appreciated.
Process:
1. Created a LaunchAgent called com.networkdrives.startup.plist in /Library/LaunchAgents
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.networkdrives.startup</string>
<key>Program</key>
<string>/Casper/MapNetworkDriveScript.sh</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
- The LaunchAgent points to a script called MapNetworkDriveScript.sh located in /Casper
open /Casper/NetworkDrivesTS.app --args -AppCommandLineArg
- The script launches NetworkDrivesTS.app located in the same folder /Casper when should mount the network drives.
*When I manually launch NetworkDrivesTS.app the network drives mount.
Any suggestions?
Thank-you,
-Anthony