Using JumpCloud Commands, many administrators users will deploy scripts and commands to further their ability for systems management using JumpCloud. In working with a varied audience of users and environments, we have collaborated to create some "Policy" commands for purposes ranging from security to software management. Learn more about commands in Get Started: Commands.
The commands listed in this article are specific to adding a new printer, or deleting an existing printer on a Mac system.
Considerations:
- The command must be set to Run As root or a user with passwordless sudo access.
To grant a user passwordless sudo access, select Global Passwordless Sudo under the user's Details > User Security Settings and Permissions.
Adding a Printer
To add a new printer to the system, you will need:
- The printer name
- The IP or DNS address
- A path to the printer PPD file
- A description for the printer
Run the following command, substituting the name of printer, printer IP or DNS, path to PPD file, and description with your specifics:
/usr/sbin/lpadmin -p "name of printer" -E -v lpd://"printer IP or DNS"/"queue name" -P "path to PPD file" -D "description"
Example:
/usr/sbin/lpadmin -p "Brother" -E -v lpd://10.128.0.59/ -P /Users/rbalboa/Desktop/brother.ppd -D "Brother Color Printer"
Deleting a Printer
To delete the printer, you will need:
- The printer name
Run the following command, substituting the name of printer with your specifics:
/usr/sbin/lpadmin -x "name of printer"