/build/static/layout/Breadcrumb_cap_w.png

Mounting SMB Drives MAC

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

Answers (2)

Posted by: chucksteel 7 years ago
Red Belt
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.


Comments:
  • Thank you. Do you use the online shell script to push this out or the online kscript? - fleminsa 7 years ago
    • 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. - chucksteel 7 years ago
      • Thank you for your assistance on this. What happens if the machine is connected from off company network? Do error messages show up? - fleminsa 7 years ago
      • 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. - chucksteel 7 years ago
Posted by: chucksteel 8 years ago
Red Belt
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.


Comments:
  • Do you have any scripting examples on that you are willing to share? - fleminsa 7 years ago

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