I used this script below to change mac address randomly every time it is ran.
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether
ifconfig en0 | grep ether
I want Automator to do it for me. When I run this Shell Script, it runs successfully but when I actually open Terminal and run
ifconfig en0 | grep ether
to see if it changed MAC address I find out it didn't.
If i manually enter such script into Terminal, it works perfectly. What should I do?