1

I usually distribute inetloc files to people who need to occasionally access shared drives... they're super convenient, and, since their existence, it's been possible to include passwords (though in plain text).. For those who don't know what I'm talking about, open TextEdit, type in the following:

smb://login:password@address/Sharepoint

then select the whole thing, drag it to the desktop and, voilà, you've got a ready-made shortcut to your shared drive!

The Problem Is: as of 10.14.2, Mojave ignores the included password and puts up a password dialog, which defeats the whole purpose of these shortcuts.. Indeed, the problem is that these shortcuts can include the password without the user having to ever re-enter it

(Additionally, inetloc files have never worked to mount NFS shares)

1

So, the only solution now is to create an AppleScript app (using Script Editor) with the following command:

tell application "Finder" to mount volume "smb://login:password@address/Sharepoint"

note that this works with nfs shares too -- even though inetloc files never did...

Alternatively, you can use the command:

tell application "Finder" to open location

but that no longer works with nfs shares since 10.14.2 either

1

To build on what Peter said, this is the code snipped I use in my bash script:

/usr/bin/osascript > /dev/null << EOT

       tell application "Finder" 
       activate
       mount volume "smb://login:password@address/Sharepoint"
       end tell

EOT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .