Network drives at logon, Jamf not able to talk to Finder.

aitkenhelpdesk
New Contributor

Hi there,

I'm having issues mapping network drives via device logon script. Script has part:
if [[ $adgroups =~ .S2018. ]]
then
writelog "Mounting folder for year 2018"
/usr/bin/osascript << EOT
tell application "Finder" activate
mount volume "smb://server.local/12345"
end tell
EOT
killall cfprefsd
defaults write com.apple.finder ShowMountedServersOnDesktop true
killall -HUP Finder
writelog "Mount completed"
exit 0
fi

All other parts are working OK except actually osascript. It gives error: Execution error: Finder got an error: Aplication isn't running. (-600) during test run via JAMF remote.

Same script launched in the interactive session from terminal - working OK. But how I can run "logon" script if JAMF is not able to talk to Finder?

Are there any other options? I tried 'open "smb://server.local/12345"' - failing as well as session is not initialised. Tried 'osascript -e 'mount volume "smb://server.local/12345"' - also failing.

Because script itself is working - it's definitely the launch part I'm doing wrong. Where I should put the script or how to launch it to get result?

Thank you.

0 REPLIES 0