macOS Sierra Automount on Startup

I have a little Script as Startup-Object:

https://picload.org/image/rrrpioli/bildschirmfoto2016-07-06um17.3.png


In this Script 2 Shares from my NAS (nas.box) and a Raspberry Pi (Raspi3) should mounted on Startup. This worked with El Capitan without problems. Since macOS Sierra Beta 1 the Script loads and mounting starts after startup but asks for my Login-Data. Username an Passwords are filled, but i must click on "Connect". For the NAS-Share, the Option to store the Login-Data to Keychain is checked. On the Raspberry-Share it's not checked, but the User-Data are also filled.


https://picload.org/image/rrrpioli/bildschirmfoto2016-07-06um17.3.png


https://picload.org/image/rrrpiolw/bildschirmfoto2016-07-06um17.3.png


The Problem is, that this occours every time, when i reboot my Mac or Logout/Login to my User-Account. I've tried to delete the Objects from Keychain, but it doesent change anything.


Any suggestions?

Accepted Reply

Here is how I am dealing with it.


Go to your home folder ~ and create a folder named Server. Open the newly created Server folder and make another folder named Drive.


Then launch Applescript Editor and create a new script like so:


do shell script "mount_afp afp://user:password@ip_address/Drive ~/Server/Drive"


You will need to enter your particulars here. Example : "mount_afp afp://bob:xyz123@192.168.1.100/bob ~/Server/Drive"


Save your script as an application.


Open System Preferences - User & Groups - Login Items. Drag your script application into the box for automatic login items. Reboot.


Your drive should be on your desktop.


Good luck.

Replies

Hi,
I am trying this, that is very simple and seems working


http://blog.grapii.com/2015/06/keep-network-drives-mounted-on-mac-os-x-using-autofs/

Hello. Can you help me to combine Auto VPN and then mount drive? VPN on idle set vpn_name to "'VPN'" tell application "System Events" set rc to do shell script "scutil --nc status " & vpn_name if rc starts with "Disconnected" then do shell script "scutil --nc start " & vpn_name end if end tell return 10 end idle NAS tell application "Finder" try mount volume "afp://10.0.1.10/Public" mount volume "afp://10.0.1.11/Public" end try end tell return 10 tell application "Finder" activate end tell Thanks