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

Still problem. 10.12.1 Beta(16B2327e)

Apple have locked down the

/Volumes
folder as confirmed here:


https://openradar.appspot.com/radar?id=4948585099558912


There are not workaround....


-j

Hi all,

I have the very same problem with actual macOS final release for Sierra, 4 iMac, 3 Macbook, and 2 Mini (for server purposes).


Servers are the most problematics, please Apple help fix it!

Confirmed the same. Reported as a bug to Apple. I'll be sure to post any updates if my bug report is acknowledged.

Confirmed; same issue here in Sierra 10.12 public release, and also when using the utility "Drive Mounter".

Same Here. Apple is all about Security these days. But this is a feature Apple need to fix. Many business customers will complain about this ****.

Same problem un 10.12.1 Public release beta

I have a Synology that goes to sleep at night and normally the mount volume command will do the trick to reconnect the share after my Synology wakes.
Since MacOS sierra it is necessary to click the button connect with the given credentials.


I made a temporary solution that will autoconnect the share, but you'll have to make two applescripts.


Script 1: Connect the share

===

tell application "Finder"

try

mount volume "smb://username:password@networklocation/sharename"

end try

end tell

===


Script 2: Hitting the return button

===

tell application "System Events"

keystroke return

end tell

===


After you made the two scripts you have to make 2 calendar items.

Open Calendar and create a new event.

Pull down the menu next to “Alert” and choose “Open File” now choose the first script.


Make a second event (just one minute later) and choose the second script.
Basically the first script will run at the selected time and will be waiting for the return button that will arrive one minute later.


This way it's automated again. And you can copy the events to another day. It's not a clean solution but it works for me until Apple comes with a update / solution.

Having the same issue with 10.12 (16A323). It's super annoying that shares cause a "Connect As" window to pop-up, with pre-populated Name and Password fields, and I have to manually press Connect. This is wreaking havoc with my scripts and backup utilities. Never had this issue with previous versions of the OS.

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.

I am using the Users & Group Login Items built-in function to automatically mount a drive on startup and I am having this issue above. It seems unreasonable that Apple would change the security settings to prevent mounting by its own system.

Try my solution above. It is a bit of a kludge, but it works.

"Hi @Atarimac


I'm a bit of confused. Where should I create the "folder named Server" ? What home are you talking about ? The NAS one or on the mac ?


Excuse my misunderstandment but I'm really annoyed by this new "feature" and I'm absolutely not familiar with developpement.



regards.

I dealt with it completely


Restore from Time Capsule backup - back to El Capitan.


I want my Mac mini to mount some (media) folders on my NAS on boot, I have mountwatcher installed and I dont want to use any srcipt to press 'Enter'

If you use my above solution, you do not need to press enter nor script pressing enter. Everything just works. The mount location is moved, but that is seamless to your workflow.


Instead of the mount point being in /Volumes it is located in your home folder.