![]() ![]() In a new Terminal session: (Be aware that running newmac will shortly disconnect any active WiFi connection). ![]() 1.) Register the shell aliasĪssuming that our WiFi interface is en0(the default on all Macbooks that I’ve seen so far), under our regular user, we run: cat >$HOME/.bash_profile /etc/sudoers.d/newmac <<EOF Cmnd_Alias CMD_NEWMAC = /sbin/ifconfig en0 ether * ALL ALL=NOPASSWD: CMD_NEWMAC EOF 3.) Usage/Testing We can incorporate this into a bash shell alias, so that running the command newmac in a Terminal is all we need to do to quickly give the WiFi interface a new, random MAC address. On macOS, the MAC address of an interface can get changed via ifconfig : ifconfig ether (For example when testing a WiFi system or to extend the free usage time on a public hotspot). Icon made by itim2101 from Sometimes it can be useful to change the MAC address of a laptop’s WiFi interface to a new, random one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |