macOS 27: ifconfig command no longer prints hardware MAC address

Just a quick PSA. A handful of my scripts broke today after installing macOS 27. Turns out they decided to redact the interface hardware ether/MAC addresses, all of them report 02:00:00:00:00:00

(…unless you run with "sudo")

Luckily, you can still get the MAC addresses with

    networksetup -getmacaddress en0

7 points | by luckman212 3 days ago

8 comments

  • luckman212 2 days ago
  • asiliev20 1 day ago
    Who needs a physical MAC address when you can just have a spiritual connection to the iCloud?
  • luckman212 2 days ago
    27.0.1 did not fix it, and I reproduced it on 2 more Macs, one was literally factory reset, just installed a fresh macOS 27, installed Homebrew, installed Bash5, ran ifconfig .... bug reproduced
  • luckman212 2 days ago
    Interestingly, running `ifconfig` from a Zsh shell still does show MAC addresses
  • ButlerianJihad 2 days ago
    ifconfig is deprecated in modern Linux. Is it not deprecated in BSD? Does Apple not provide the ip(8) command-line tools?

    https://manpages.ubuntu.com/manpages/stonking/man8/ip.8.html

    No, it seems that iproute2 is Linux-first, or Linux-only: https://en.wikipedia.org/wiki/Iproute2

    Sad!

    • dTal 2 days ago
      Who says it's deprecated? If it's the same people who think my Ethernet port should be called "enp0s31f6" instead of "eth0", then I'm afraid I do not respect their authority...
      • ButlerianJihad 2 days ago
        The people who maintained it, the kernel developers, the Debian distribution team? You don't accept their authority? I mean, I know this is a MacOS thread, but that's wild.

        https://lists.debian.org/debian-devel/2009/03/msg00780.html

        16+ years ago

        The maintainers barely touched it since 2001.

        • fragmede 2 days ago
          Fascinatingly enough, this is Conway's law in action. The Linux kernel doesn't break user space, and ifconfig is on the user space side of that boundary. On BSD, they're organized differently, and went a different way.
  • lapcat 3 days ago
    I can't reproduce this.
    • luckman212 2 days ago
      It seems to only affect Bash 5.3.20 (Homebrew) - very odd:

          % /bin/bash --version
          GNU bash, version 3.2.57(1)-release (arm64-apple-darwin26)
          
          % /opt/homebrew/bin/bash --version
          GNU bash, version 5.3.20(1)-release (aarch64-apple-darwin27.0.0)
          
          % zsh -c '/sbin/ifconfig en0 | grep ether'
          ether d0:11:e5:1a:27:7a
          
          % /bin/bash -c '/sbin/ifconfig en0 | grep ether'
          ether d0:11:e5:1a:27:7a
          
          % /opt/homebrew/bin/bash -c '/sbin/ifconfig en0 | grep ether'
          ether 02:00:00:00:00:00
      • jen20 1 day ago
        Interestingly I can also reproduce it with Bash 5.3.15 from nix-darwin.

        I wonder if this is about notarization or something.

        • jen20 1 day ago
          Update: I think it's about code signature and how the API responds - which also corresponds to root and system binaries not seeing the issue.
      • hrbrmstr 2 days ago
        it works fine in system bash for me
        • luckman212 2 days ago
          Yes it works in my system bash too (see above) - seems to be some sort of obscure Bash bug...
  • arkonvault 9 hours ago
    [dead]