Skip to main content

Printers

Fusion File Share Server supports printer sharing over SMB. To share a printer, it must first be detected and properly configured on the Linux server running Fusion File Share Server.

Configuring A Printer Share

To configure a printer share, follow these steps:

  1. Discover the printer's name.
  2. Add the printer share to the Fusion File Share Server configuration.

Discovering the Printer's Name

Run the following command to retrieve the printer name:

cat /etc/printcap

The output should resemble the following:

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.
Hewlett-Packard-HP-Color-LaserJet-CM3530-MFP|Hewlett-Packard HP Color LaserJet CM3530 MFP:rm=ceirt:rp=Hewlett-Packard-HP-Color-LaserJet-CM3530-MFP:

From the output above, the printer name is identified as Hewlett-Packard-HP-Color-LaserJet-CM3530-MFP.

The following parameters specify that a share is intended for a printer:

Adding a Printer Share

You can add a printer share via the configuration file or the command line interface (CLI). Unlike disk shares, printer shares have a distinct type parameter, with the path pointing to the printer's name, and the permissions should be at least Change.

Share Parameter Share Type

Value Type: string

Value Format: disk|printer

  • disk: Indicates this share refers to a shared directory on the file system containing the share.
  • printer: Indicates that this share refers to a printer.

Default Value: disk

Share Parameter Printer Queue Name

Value Type: string

Value Format: <path>
Where <path> is:

  • For shared directories: The directory on the server's file system to be shared.
  • For printer shares: The name of the print queue.

Default Value: none.

Examples:

  • /export/sh1, if the share type is disk, indicates that the shared directory is /export/sh1.
  • paperjam, if the share type is printer, indicates that the print queue is called paperjam.
Share Parameter Permissions

Value Type: string

Value Format: <id>:<access>, <id>:<access>, ...

  • <id> is the identifier to which its corresponding <access> applies. It can be:

    • Predefined groups (corresponding to similarly named standard Windows groups):
      • everyone: All users, excluding anonymous users.
      • anonymous: Anonymous users in a null session.
      • authenticatedusers: All authenticated users.
    • Username: A user on the domain or local machine
      • Example: johndoe
    • Group, prefixed by @:
      • Example: @staff
    • Security identifier (SID), prefixed by *S-:
      • Example: *S-1-1-0
    note

    User and group specification dependens on the authentication backend defined by the userdb_type global parameter.

  • <access> defines the access level granted to the identified user or group. It can be one of the following:

    • no: Denies all access.
    • read: Grants Read, ReadAttributes, ReadControl, and Execute permissions.
    • change: Grants all permissions granted by read, as well as the Write, WriteAttributes, AppendData, and Delete permissions.
    • full: Grants all permissions granted by change, as well as the DeleteChild, WriteDAC, and WriteOwner permissions.
    note

    For printer shares, <access> must be set to either full or change.

important

If an <id> cannot be resolved to a SID, it is ignored if <access> is read, change, or full. However, if <access> is no, the permission applies to all users, rendering the share inaccessible.

Moreover, Fusion File Share Server will continue attempting to resolve the <id> against the underlying authentication backend, such as Active Directory, which may slow down access to the share.

To ignore unresolved <id> values, you can set the share's ignore_unresolved_share_deny_permission parameter to true. However, this may grant unintended access, for example if <id> was misspelled.

Default Value: everyone:read

Examples:

  • everyone:full grants full access to `everyone``.
  • johndoe:full, @staff:change grants full access to user johndoe, and change access to all users in the staff group.
  • anonymous:read grants read access to anonymous users.

Adding a Printer Share Using the Configuration File

To configure a printer share, add a [share] section to the configuration file. Specify the type as printer, set the path parameter to the printer's name, and configure the required permissions. For example:

[share]
netname = MyPrinter
type = printer
path = Hewlett-Packard-HP-Color-LaserJet-CM3530-MFP
permissions = everyone:full
[/share]

Adding a Printer Share Using the CLI

You can also add a printer share via the CLI, using the tsmb-cfg share add command. For example:

tsmb-cfg share add -n MyPrinter -t printer -p Hewlett-Packard-HP-Color-LaserJet-CM3530-MFP -P everyone:full