Login via terminal


I am currently working on an automated installation script for my Mac, which would allow me to set up a new Mac within minutes with homebrew etc.

It is already possible to install the nextcloud client on a Mac with brew cask install nextcloud. My question now is: is it possible to save the login credentials in a script, so that it will automatically connect to my NextCloudPi server and all I have to do is opening the app/folder in finder and everything is already there? :slight_smile:

Thanks in advance for any help!

Hello @misanthrophy

Uff this is heavy stuff.
Nextcloud Client stores its login credentials inside the macOS Keychain.
Over the security binary can you access the Keychain cli. But be careful and make sure that u understand what you do before executing any commands on your System.

Quick googeling showed me richfull results:

Why not making your live easier? Take a look at jamf.com :wink: