Disables printer sharing on macOS endpoints to prevent print server exploitation
This Automox Worklet™ disables printer sharing on macOS endpoints using the CUPS (Common Unix Printing System) configuration utility. The Worklet evaluates the current printer sharing state and applies remediation when necessary to prevent unauthorized access through the print service.
The Worklet uses the cupsctl command with the --no-share-printers option to disable the _share_printers CUPS parameter. This prevents the endpoint from accepting print requests from remote systems, effectively isolating the print service to local connections only.
Printer sharing services allow other network users to route print jobs through the endpoint. Attackers can exploit printer sharing to access the endpoint's print queue, view document contents being printed, and potentially gain information about sensitive business operations. Print jobs often contain confidential data including financial reports, employee information, and proprietary business documents.
Organizations with dedicated network printers do not need endpoint-level printer sharing enabled. User workstations should connect directly to network print servers rather than routing print jobs through other endpoints. Disabling printer sharing eliminates unnecessary network services and reduces the attack surface of your macOS fleet.
Printer sharing creates network traffic that complicates firewall rules and network segmentation. Endpoints that share printers must accept inbound connections on print service ports, creating exceptions to security policies that otherwise block all incoming connections to user workstations.
Evaluation phase: The Worklet runs cupsctl to check the current _share_printers parameter setting. If the parameter equals 1, printer sharing is enabled and remediation is required. If the parameter equals 0 or is not set, the endpoint is already compliant and no action is needed.
Remediation phase: When printer sharing is enabled, the Worklet executes cupsctl --no-share-printers to disable the _share_printers parameter. This configuration change takes effect immediately and persists across endpoint restarts.
macOS endpoints (Macs running any supported version)
CUPS (Common Unix Printing System) available on the endpoint
Administrative or root privileges to modify CUPS configuration
FixNow compatible for immediate remediation
After remediation, the endpoint no longer advertises printer sharing services on the network. Other users cannot route print jobs through the affected endpoint. The local user can still print to network printers and directly connected printers without any functionality loss.
The Worklet verifies printer sharing is disabled through its evaluation check. IT operations teams can confirm the setting by checking System Preferences under Sharing or reviewing Worklet execution results in the Automox console.
Run this Worklet on a pilot macOS endpoint and review evaluation output for disable printer sharing.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as exit, else.
Validate remediation effects from script operations such as cupsctl, else, exit, then rerun evaluation for compliance.
For technical validation, compare endpoint state to the Worklet evaluation logic and remediation flow for disable printer sharing. This supports repeatable security workflows, faster change control review, and auditable compliance evidence.
Useful script references for this Worklet include evaluation operations such as exit, else and remediation operations such as cupsctl, else, exit. Use these indicators to verify that endpoint changes match intended policy outcomes.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy