[cfarm-users] cfarm104 maintenance planning

Zach van Rijn me at zv.io
Tue Apr 14 06:04:22 CEST 2026


On Mon, 2026-04-13 at 16:40 -0700, Paul H. Hargrove wrote:
> Zach,
> 
> I want to take a moment to say what I hope everyone on this
> list is thinking:
> 
> THANK YOU for your continued efforts.

Thanks Paul.

Upon closer inspection:

As of my last email, 859 user accounts were not working; 259
seemed to be working. After some fixes (see below) all are OK.

There was no obvious pattern between the accounts that required
"fixing" after both the unreliable 12-13 and 26.2-26.4 updates.

The workaround from my 2026-01-07 email to recreate accounts is
not working with this version of macOS, but there's a quick fix.

If my notes are accurate, the behavior of 'dscl . -delete ...'
has changed between macOS versions: nx names now fail loudly.

Here is the updated version of the script for macOS 26.4.1:

----------------------------------------------------------------
#!/bin/sh -e

# this script is to fix user accounts if they stop working
# due to a glitch in directory service after a macOS update
# (see cfarm-users around 2026-01-07)

ls -l /Users/ | awk '{print $9,$3}' | grep -E '^[a-z]' | while
read name uid_or_name; do

    # fix permissions if needed
    chmod 700 /Users/${name};

    # skip if account is correctly set up
    test $uid_or_name = $name && echo skip $name && continue;

    # delete if in bad state (see cfarm-users around 2026-01-13)
    # note: force because it may fail with macos >= 26.x??
    dscl . -delete /Users/${name} > /dev/null 2>&1 || true;

    # recreate from scratch
    echo make $name
    dscl . -create /Users/${name}
    dscl . -create /Users/${name} UniqueID ${uid_or_name};
    dscl . -create /Users/${name} UserShell /bin/bash
    dscl . -create /Users/${name} PrimaryGroupID 80
    dscl . -create /Users/${name} NFSHomeDirectory
/Users/${name}

done
----------------------------------------------------------------

Spot-checking a handful of accounts shows no immediate issues.

No data loss.

Homebrew has also been updated.


Zach


More information about the cfarm-users mailing list