Posted on 07-11-2016 02:15 PM
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>
open /Casper/NetworkDrivesTS.app --args -AppCommandLineArg
*When I manually launch NetworkDrivesTS.app the network drives mount.
Any suggestions?
Thank-you,
-Anthony
Posted on 07-11-2016 03:46 PM
Hi @apanages
Are your user accounts network accounts or local accounts?
I would suggest trying a Config Profile with a Login Items payload and add the network drive path names that you wish to mount on login. This should do it for you. If not you could always use the same Config Profile and just add the aforementioned .app as a login item.
Cheers,
Pat
Posted on 07-13-2016 10:53 AM