function to change MAC address and hostname