Setting your arbitrary computer naming convention during DEP enrollment

Or rather, how I set our arbitrary computer naming convention on a machine during DEP enrollment. At my shop, we use the format $username-mac to name our Macs. I'm not sure why, or why it really matters, but for some reason some organizations get really weird and particular about computer names. Most of it comes down to not utilizing reporting tools well to do computer record/detail lookups imho. Anyway.

Here's what it does:

  • Detects location of jamf binary on the machine
  • Detects the username of the logged-in user (so this works best if you have the user create their account during DEP enrollment/setup assistant
  • Formats the computer name in the way we want it
  • Uses scutil to set computer name/hostname/local hostname
  • Sets the NetBIOS name to match
  • Is probably too thorough and then uses jamf's setComputerName to set the name as well
  • Throws in some echos for good measure

I use it in one of the enrollmentComplete policies, scoped to our DEP PreStage Enrollment machines, before a recon.

I'd be happy using, like, any computer name but, well, I do what I'm told. Hopefully the above helps some of you out too.

Pleeeeeeease test before deploying!

Fave Friday

Nintendo Game Boy Patent print

Wood grain contact paper upgrade on an IKEA Micke desk (by Happy Mundane)

Katt3 Modular Cat Climbing System (on Haus Panther shop)

Creature from the Black Lagoon tattoo (Source)

Gardner media cabinet (All Modern)

Have a great weekend!

Fave Friday

Finding shutdown causes in macOS Sierra's mind-boggling new logging

Say that 10x fast… (and try googling it…)

I won't delve into too many details here as there are a lot of great resources out there for using the new logging in Sierra, but there doesn't seem to be a place where one of my most helpful system log searches is found online.

^^^ That in will get you the last 24 hours worth of "Previous shutdown cause" messages from the system logs. Useful for troubleshooting.

If you need a handy list of shutdown code meanings and don't have an Apple Training Guide doc handy, this list is very helpful.

Fave Friday

Fave Friday

Nintendo Switch NES Themed Dock Sock by TinckoyMakesitSew on Etsy

Cute hexagonal wall shelves, no source

20 Stitch Table Runner crochet pattern from Sewrella

Domino phone case by Valfré

Karpe Diem: Useless Goldfish Monster Hat by Akabeko Botan on Ravelry

Have a great weekend!

Fave Friday

Pegboard yarn storage idea from Knits for Life

Maneki Neko tote bag

DIY vanilla latte coffee scrub from A Beautiful Mess

"I met Li'l Sebastian at the Pawnee Harvest Festival" shirt from Look Human

Airstream Silver Bullet cat house

Have a great weekend!