Short answer: the four defaults keys stop the Dock being resized, moved, emptied or hidden, and on a desk with one responsible person nearby that is usually enough.
The one thing they cannot fix is the Dock following the pointer onto a second screen, because macOS has no setting for it. If the second screen faces a customer, that is the problem worth solving first.
On a personal Mac a Dock at the wrong size is an irritation. On a front desk, a reception counter or a showroom demo unit, it is the first thing a customer looks at while they wait, and it is being read as a statement about how the place is run.
The failures are the ordinary ones, and they are ordinary because the machine is used by whoever is on shift:
defaults write com.apple.dock size-immutable -bool true
defaults write com.apple.dock position-immutable -bool true
defaults write com.apple.dock contents-immutable -bool true
defaults write com.apple.dock autohide-immutable -bool true
killall Dock
Each grays out the matching control in System Settings, so it cannot be changed from the interface at all. They are per account, they survive a restart and a macOS update, and they are undone by removing the key rather than setting it to false:
defaults delete com.apple.dock autohide-immutable; killall Dock
Every key with its type is in every Mac Dock defaults command.
Reception desks and showrooms nearly always have a second display: a customer-facing panel, a wall screen, a demo monitor. And the Dock is not assigned to a screen. It follows the pointer. Push the cursor to the bottom edge of any display and hold it there, and the Dock moves to that one.
There is no defaults key for this and no setting in System Settings. It is what Apple designed the Dock to do, and it means a Dock full of internal tools can appear on the screen a customer is looking at, mid-conversation, because somebody reached for something.
The workarounds all cost you something: turning off “Displays have separate Spaces”, moving the Dock to a side edge, or changing which display is the main one. Each is explained with its cost in how to keep the Mac Dock on one screen. If none of those are acceptable on a desk that has to look right, an app that holds the Dock to one screen is the remaining option.
A classroom has a teacher who set the room up and remembers. A library has a baseline image. A front desk has whoever is working today, and in a year that is a different person.
Which means the failure mode here is not a lock being undone. It is a lock nobody remembers setting. Somebody opens System Settings a year from now, finds the Dock controls grayed out with a note that they are managed, and has no idea who did it or why. That is a support ticket, and occasionally a wiped machine.
So the two things worth doing on a business Mac, beyond the locks themselves:
defaults command. Fine when nobody at the desk opens Terminal, which on a front desk is most of the time. Free, and reversible in one line.All three compared, with what each costs: how to lock the Dock on a Mac, 3 ways compared.
macOS adds a section of recently used applications to the right of the Dock. On a customer-facing screen it shows whatever the last member of staff opened. Turn it off:
defaults write com.apple.dock show-recents -bool false
killall Dock
The four locks do not remove it. It is a separate setting, covered in how to stop recent apps appearing in the Dock.
No. position-immutable stops the Dock being moved to a different edge of a screen. It has nothing to say about which screen the Dock is on, because macOS provides no setting for that at all.
That depends on how many staff and how many shifts. One person at one desk rarely needs it. A counter used by six people over three shifts is where the Dock drifts fastest, because no single person notices the change.
No. They live in the account’s preferences rather than in the system, so an update leaves them alone.
Then the customer is using it rather than looking at it, and the reasoning changes. See locking the Dock on a shop or showroom Mac.
The commands are. The situation is not: a classroom has accounts and supervision, and a student who can open Terminal. See locking the Dock on a classroom Mac, on a family Mac, or the shared Mac guide for the general case.