Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mounting network drives with Terminal in OSX 10.12 / Sierra

I just updated to OSX 10.12 / Sierra. Usually when I reboot my computer, I run the following in a script to mount my network drives:

mount -t afp afp://user:[email protected]/SKYDEDAGE /Volumes/SKYDEDAGE2015

This has always worked. However after updating to OSX 10.12 / Sierra, this command no longer works. In the script I run, Prior to using the mount command, I make a directory/mountpoint in 'Volumes'. The command still doesn't work, even though the directory/mountpoint exists.

I get this error code:

mount_afp: AFPMountURL returned error 1, errno is 1

Any ideas why this aren't working anymore?

like image 630
Polle Avatar asked Sep 01 '25 01:09

Polle


1 Answers

Just in case anyone else stumbles over this question and needs a solution, in OS X 10.12, you can use "open":

open smb://<user>:<password>@server/<Volume>

The extra step with creating the folder in /Volumes can be omitted

like image 159
Christian Avatar answered Sep 02 '25 15:09

Christian