Mapping shared printers to logical printers on Linux clients

You can map an SMB server shared printer to a logical printer on Linux clients through interactive or command-line access.

Use the following steps for interactive access:

  1. Open a Linux command-line window.
  2. Enter the following command to obtain a list of SMB server shared printers, where zOSS1 is the computer name of the SMB server, username is the name of a Linux user mapped to a TSO/E user, and password is the CLEAR or encrypted password for the mapped user.
    smbclient -L //zOSS1 -U username%password
  3. Enter the following command to gain interactive access to a shared printer, where shared-printer is the name of the SMB server's shared printer.
    smbclient //zOSS1/shared-printer -U username%password
  4. Enter the following command to print a local Linux file whose fully-qualified path name is /root/.profile. You can use -W option to specify the workgroup, where subdomainname is the name of a valid subdomain.
    print /root/.profile -W subdomainname
  5. Enter queue to view the queue of print job requests.
  6. Enter quit to exit the interactive session.

Use the following steps for command-line access:

  1. Open a Linux command-line window.
  2. Enter the following command to obtain a list of SMB server shared printers, where zOSS1 is the computer name of the SMB server.
    smbclient -L //zOSS1 -U username%password
  3. Enter the following command to print a local Linux file whose fully-qualified path name is /root/.profile and prt1 is the name of the SMB server's shared printer.
    smbclient //server/prt1 -U user%pw -c "print /root/.profile"
  4. Enter the following command to view the queue of print job requests made through the preceding print command:
    smbclient //zOSS1/prt1 -U user%pw -c "queue"
To can cancel a print job, you can issue the following command.
smbclient //zOSS1/prt1 -U user%pw -c "cancel jobid"