Overview
The Linux Printer Policy deploys CUPS printer queues on Linux devices enrolled in Swif. Each printer entry defines a queue name, connection method, and driver method.
Use the policy to configure USB printers, network printers, or printers shared through a Windows or Samba server. You can include multiple printer queues in one policy.
The policy supports both company-owned and BYOD Linux devices.
Requirements
Requirement | Details |
Platform | Linux |
Ownership | Company-owned or BYOD |
Management | Device enrolled in Swif, with the Linux agent able to receive and apply policies |
Printing system | A working CUPS installation with the backend needed for the selected connection |
Connectivity | Access to the network printer or print server, or a connected USB printer |
Driver | A compatible driverless IPP endpoint, a local PPD file, or an installed CUPS model |
SMB authentication | If required, credentials and the referenced password source must be available on the device |
Prepare required printing packages, driver files, and credentials before deployment. A PPD path or model ID refers to a resource on the Linux device; entering it does not upload a driver from the administrator’s computer.
Create the Policy
In the Swif Admin Dashboard, open Device Management > Policies and create a policy.
Select Linux Printer Policy.
Enter a descriptive policy name, such as
London Office Printers.Add an entry under Printers.
Enter the queue’s Name and optional Description.
Select a Connection > Method and complete its connection details.
Select a Driver > Method and complete any required driver details.
Add more printer entries if needed.
Save and assign the policy to a test device or group.
Allow the device to check in, review the policy result, and test printing before expanding the assignment.
Only the details for the selected connection or driver method are displayed.
Printer Settings
Setting | Required | Description |
Name | Yes | CUPS queue name, unique within the policy |
Description | No | Human-readable description of the printer |
Connection | Yes | How the Linux device reaches the printer |
Driver | Yes | How CUPS prepares output for the printer |
Queue names must not contain spaces, tabs, /, or #. For example, use Office_Color as the name and Office color printer, second floor as the description.
CUPS treats queue names as case-insensitive, so do not use capitalization alone to distinguish printers. See CUPS printer configuration.
Use consistent queue names across a deployment, and avoid assigning competing definitions for the same queue to one device.
Connection Methods
USB
Select usb for a directly connected printer. Swif builds a usb:// URI from these fields:
Setting | Required | Description |
Vendor | Yes | Vendor component used in the USB printer URI |
Model | Yes | Model component used in the USB printer URI |
Serial | No | Identifies a specific printer when multiple devices have the same vendor and model |
Inspect the device’s CUPS printer discovery results before entering these values:
lpinfo -v
Use the identifiers reported for the printer rather than guessing from its marketing name. If you need to preserve an exact discovered URI, use rawUri.
The USB Model identifies the connected device. It is separate from the Driver > Model ID, which selects a CUPS driver.
IPP or IPPS
Select ipp for Internet Printing Protocol. The TLS switch determines whether Swif builds an ipp:// or ipps:// URI.
Setting | Required | Default or behavior |
Host | Yes | Printer or print-server hostname or IP address |
Port | No | Swif defaults to |
Path | No |
|
TLS | No |
|
An explicit port must be an integer from 1 to 65535.
Set the port to match the printer’s actual endpoint. Swif’s TLS default of 443 is a policy default, not a requirement for IPPS. An IPPS printer can use port 631. The resource path can also differ, especially for print-server queues.
For compatible network printers, prefer IPPS with a working certificate configuration. CUPS documents IPP/IPPS URI formats in Using Network Printers.
Socket / JetDirect
Select socket for an AppSocket or JetDirect connection. Swif builds a socket:// URI.
Setting | Required | Default or behavior |
Host | Yes | Printer hostname or IP address |
Port | No |
|
Example destination:
socket://printer.example.com:9100
AppSocket does not provide transport encryption. Use it where required by the printer and network design. See CUPS network protocol guidance.
SMB
Select smb for a printer shared by a Windows or Samba server. Swif builds an smb:// URI.
Setting | Required | Description |
Host | Yes | Print-server hostname or IP address |
Share | Yes | Printer share name |
Domain | No | Windows/Samba domain or workgroup |
Username | No | Account used to authenticate to the share |
Password | No | Reference to a password source on the Linux device |
Optional authentication fields may still be necessary for a particular server. Confirm the share’s access requirements and the device’s SMB printing support.
Password References
When configuring Password, select one of these methods:
Method | Field to complete | Example |
env | Environment Variable, containing the variable name |
|
file | File, containing an absolute path to the secret file |
|
Enter the variable name or file path, not the password itself. Provision the secret separately on every targeted device.
For env, the variable must be available to the process applying the policy. A variable exported only in an interactive terminal may not be available to a background service.
For file, ensure that the policy process can read the file and that unrelated users cannot. The reference does not itself create the file or encrypt its contents.
Raw URI
Select rawUri when you need to supply a complete CUPS device URI. URI is required.
Examples:
ipp://print.example.com/printers/Office_Color ipps://printer.example.com:631/ipp/print socket://printer.example.com:9100
The URI must use a backend available on the device. You must still choose a driver method.
Raw URI means a complete connection address. It does not select a raw, unfiltered print queue.
Driver Methods
Method | Required details | Use case |
driverless | No additional driver fields | Compatible driverless/IPP Everywhere printers |
ppd | Path, an absolute path to a PPD on the device | Printers requiring a specific PostScript Printer Description file |
model | Model ID, a CUPS driver identifier installed on the device | Printers supported by an installed CUPS driver package |
Driverless
Use driverless with a compatible IPP/IPPS endpoint. No separate vendor PPD file is needed.
Do not assume driverless printing works with a socket://, smb://, or direct usb:// connection. CUPS’s IPP Everywhere configuration queries an IPP endpoint for printer capabilities. See CUPS driver configuration.
PPD File
Use ppd and specify an existing file, for example:
/opt/company/printers/office-color.ppd
Use the same path on each assigned device. Verify that the file is readable and that any filters or supporting software it requires are installed.
Installed CUPS Model
List the available drivers on a target device:
lpinfo -m
Copy the appropriate driver identifier into Model ID. Do not enter only the human-readable printer description. Confirm that the same model is installed across the target group.
The lpinfo -v and lpinfo -m commands list available devices and drivers respectively. See CUPS lpinfo reference.
Configuration Examples
Driverless Network Printer Using IPPS
This example assumes the printer supports driverless IPPS on port 631 at /ipp/print.
Setting | Value |
Name |
|
Description |
|
Connection > Method |
|
IPP > Host |
|
IPP > Port |
|
IPP > Path |
|
IPP > TLS | Enabled |
Driver > Method |
|
Replace the hostname, port, and path with the printer’s verified endpoint. Port 631 is entered explicitly because enabling TLS otherwise uses Swif’s default of 443.
Socket Printer With a Local PPD
Setting | Value |
Name |
|
Connection > Method |
|
Socket > Host |
|
Socket > Port |
|
Driver > Method |
|
PPD > Path |
|
Deploy a compatible PPD and its dependencies before assigning the policy.
SMB Printer With a Password File
Setting | Value |
Name |
|
Connection > Method |
|
SMB > Host |
|
SMB > Share |
|
SMB > Domain |
|
SMB > Username |
|
Password > Method |
|
Password > File |
|
Driver > Method |
|
Model > Model ID | The compatible identifier returned by |
The example paths and hostnames are placeholders. Create the password file separately and confirm that the account can print to the share.
Verify the Policy
After deployment, review the policy result in Swif. Then run these commands on the Linux device:
lpstat -r lpstat -p Office_Color lpstat -a Office_Color lpstat -v Office_Color
These checks show whether CUPS is running, the queue’s enabled and accepting states, and its connection URI. Replace Office_Color with your queue name. See CUPS lpstat reference.
Print a non-sensitive test document from a desktop application, selecting the configured queue. Confirm the physical output, including layout and any required color or duplex behavior. A configured queue alone does not prove that the printer can successfully process a job.
Review command output before sharing it with Support, especially for authenticated printer connections.
Troubleshooting
Issue | What to check |
Policy fails or the queue is missing | Agent connectivity, policy assignment, CUPS availability, and the reported error |
Invalid queue name | Remove spaces, tabs, |
Printer cannot be reached | Hostname resolution, network/VPN access, printer power, port, and resource path |
IPPS connection fails | Explicit port, printer TLS support, certificate trust, and hostname matching |
USB printer is not found | Cable connection and the vendor/model/serial values reported by CUPS |
Driverless configuration fails | Compatible IPP endpoint and printer reachability during configuration |
PPD or model is not found | Local file path, permissions, driver package, and |
SMB authentication fails | Host/share, account permissions, domain, and availability of the referenced secret |
Queue exists but jobs do not print | Queue enabled/accepting state, job errors, printer status, and driver compatibility |
For IPPS failures, first verify the endpoint rather than disabling TLS. For SMB failures, do not include the password or secret-file contents in support logs.
Policy Scope and Removal
The policy exposes printer names, descriptions, connections, and driver selection. It does not provide fields for a default printer, paper size, duplex defaults, color restrictions, or print quotas. Configure those separately where needed.
When removing a printer entry or unassigning the policy, verify the resulting CUPS queue state. Do not assume that unassignment automatically deletes queues or restores previous printer settings. Coordinate any required cleanup with the device administrator, including pending jobs.