I have a Timemachine setting problem. And I dig this problem 2 weeks ago but not any progress.
Envirment:
100 ad doamin Mac pros
100 non ad domain Mac book air
i have created a backup storage path : afp://server-mp.oocl.com/Backups
Problem:
1) If I use timemachine profile setting which can't apply to the non AD domain mac book. Because the login mac book are offline before login so i can't apply it by mount drive at logon item
2) So i try to use script to let the computer run the tmutil script when the machine can ping the company network DNS. But the script 'tmutil setdestination afp://$user:$pass@server-mp.oocl.com/backups'. that need the user AD password but i dont know how to set variables to let user input the password by them self
Below is the script i dig
#!/bin/bash
curuser=ls -l /dev/console | cut -d " " -f 4
itest=$(ping -c 1 146.222.5.160 | grep "100.0% packet loss" | wc -l)
while [ $itest == "1" ]
do
sleep 5
itest=$(ping -c 1 146.222.5.160 | grep "100.0% packet loss" | wc -l)
done
sudo tmutil enable
sudo tmutil setdestination -p afp://$curuser@SERVER-MP.oocl.com/Backups
Does any buddy has the similar case. Please share the ideas
Thanks