/build/static/layout/Breadcrumb_cap_w.png

Best Practices Question


Mounting SMB Drives MAC

07/19/2016 747 views

Hi, does anybody have a best practice in mounting drives via MAC for Kace and to also make sure it shows up on the desktop?




0 Comments   [ + ] Show comments

Comments


All Answers

0
tell application "Finder"
tell Finder preferences
set desktop shows connected servers to true

end tell
end tell
set user_name to do shell script "whoami"
tell application "Finder"
activate


mount volume "smb://" & user_name & "@server/share/"
delay 1
end tell

This assumes that you are logged into the computer with a username that has access to the network share in question.

Answered 02/15/2017 by: chucksteel
Red Belt

  • Thank you. Do you use the online shell script to push this out or the online kscript?
    • Actually I built a package that places the script in /Applications and a launch agent plist in /Library/LaunchAgents. That package is then deployed to systems via a managed install. When users login to the system the launch agent runs the script and it mounts their network folders for them. The script in our production environment includes several mount points, above is just an example.
      • Thank you for your assistance on this. What happens if the machine is connected from off company network? Do error messages show up?
      • At this point we have only deployed this in lab environments so connecting off campus hasn't been an issue. If we were going to deploy it more widely I would probably include a check on IP address or something similar to verify that we are on the local network.
0
I don't think there is a good way to do this with the K1000. We wrote an AppleScript that mounts the network drives and have it launched via a LaunchAgent.

Answered 07/20/2016 by: chucksteel
Red Belt

  • Do you have any scripting examples on that you are willing to share?

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ