So we're trying to set things up to use Google Drive as an automagic backup solution here. I've used MacDropAny to set up my proof of concept, but I feel like that'll be too time consuming to set up on all our users' machines. I'm trying to write a script and deploy it via self service once the user's account is created, Google Drive is installed, and signed in. I've got the commands down to move the contents of the Home folder to Google Drive, then create symlinks back in the Home folder, but I'm having trouble getting it to run as local admin, as there's a few sudo's in the script and the account I'd be running it from would not have admin rights. I'm leaning towards ssh-ing into admin@localhost to get admin rights, but am stumbling on feeding the password to the script. Any help would be greatly appreciated!
Help with a script

Best answer by ShaunRMiller83
How are you planning to run your script? If you are running the script using a LaunchDaemon you could have it run as root or run for all users so that shouldn't be an issue. Alternatively you could setup a Casper policy and set it to make available for offline use. Which would functionally be similar.
Also note if you decide to run it thru Casper since the script would run as root technically you won't need the sudo commands since you're already root. Depending on your security & logging that may be a concern or maybe not.
I should have added to my initial post if you do go the LaunchDaemon route you may want to check out Lingon X.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.