Benches macOS

4

Mounting a shared drive using terminal re…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hello,

I run a lot of scripts in the background for automation, and these scripts require shared drives to be mounted to perform actions.

These drives are mounted using an "open" command like "open afp://192.168.0.1/Share" or "open smb://guest:[email protected]/AnotherShare".

Until recently, running this command would silently mount the drive on the finder and it would be available in "/Volumes".

Now, anytime my scripts use this command, an authentication window would pop up on the Finder, asking for user / password. As they are available in my keychain, the fields are already filled out, and I only have to hit enter to proceed. Then it would ask for the folder to mount (Share or AnotherShare in my examples), with the proper folder already selected. Again, I only have to hit enter to proceed and the volume will mount.

I understand this might be a protection about scripts going unnoticed mounting folders, copying files, which might be even as unsafe.

I'm running 10.13.6 with latest security patches applied. I have the same issue on 10.14.

Does anyone know how to get rid of this ? Any hidden settings ?

Thanks

jm

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Maybe...

    sudo defaults write /Library/Preferences/com.apple.NetworkAuthorization AllowUnknownServers -bool YES

    Or...

    sudo /usr/libexec/configureLocalKDC

  2. 0

    Jean-Michel Lamotte

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi BDAqua,

    Thanks for the additional commands. Tried them both, but I'm still facing the same behavior.

    jm

  3. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Just checking, did you restart after the commands?

  4. 0

    Jean-Michel Lamotte

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Restarting did not help. Still got the authentication prompt.

    Jm