User Tools

Site Tools


auth:setup_printers

This is an old revision of the document!


SETUP PRINTER UNDER LINUX

1. PRINTING via SAMBA (using a Windows Print Server)

Prerequisite!

  • Your user must be a member of the admin/sudo group
  • Install samba client package and dependency packages in order to use Printer via samba protocol:
sudo apt-get update && sudo apt-get install smbclient python3-samba

First get the name(s) of the printer(s) you want to use:

Go to the printer and look for a label with its name

Continue here

OR

Get the printer names list, but this is only available for ADMINS

To get the printer names list use smbclient. If the program is not installed do:

  • apt-get update; apt-get install smbclient

Now execute this line to get a list of the printer names:

  • smbclient -L \\<windowsprintserver> -U <unibz-login> -W <domain>

e.g.

  • smbclient -L \\print.unibz.it -U bgates -W unibz

Printer naming scheme:

UBZ 066 POS 300
|    |   |   |-> Room number

|    |   |->POS Building

|    |->IP-Adress

|->UBZ University Site Bolzano

Now that you know the name of the printer, you can starting adding a printer.

SMB URI

smb://UNIBZ/print.unibz.it/<printername>

Open your preferred browser and type this address:

  • localhost:631

Follow this guides as shown on the next screen shots

Select Add Printer from Administration Menu Chose how to connect to Printer
Select Add Printer from Administration MenuEnter your local login and password
Chose how to connect to Printer Enter Connection String SMB URI, enter Domain unibz, YOUR username and password!
Chose how to connect to PrinterEnter Connection String SMB URI, enter Domain unibz, YOUR username and password!
Enter Name, Description and Location Select Make of Printer
Enter Name, Description and LocationSelect Make of Printer
Select Driver Set initial default Options
Select DriverSet initial default Options
Set Default Options
Set Default OptionsPrinter

When printing from an Application an Authentication Window will/should pop up. If no Window pops up, you should check the taskbar for a Printer Icon, select it and release the print job by typing your login & password.

Enter your unibz username without @unibz.it and password!

Enter username and password

If the Authentication Window is NOT appearing and you get an error in “http://localhost:631” saying: NT_STATUS_LOGON_FAILURE or similar, check the file

sudo more /etc/cups/printers.conf

and verify that you have a line saying: AuthInfoRequired username,password

In case the line is missing for the printer add the line or replace the line AuthInfoRequired none with AuthInfoRequired username,password

sudo /etc/init.d/cups stop
sudo vi /etc/cups/printers.conf
sudo /etc/init.d/cups start

Example /etc/cups/printers.conf

<Printer UBZ021POS200_color>
UUID urn:uuid:2428e92d-5680-32a7-6d4a-d3ae4f8dc00a
AuthInfoRequired username,password
Info HP Color LaserJet 5550
Location POS 2R - IDSE
...
...

You can enter your username and password (in clear, not very secure!), so it won't ask you!

smb://username:password@domain/windows_print_server_host_name/printer_name

e.g.:

smb://pfile:G656fdhfgsfg#/UNIBZ.IT/print.unibz.it/ubz021pos200

2. PRINTING via KERBEROS (using a Windows Print Server)

Cups printer setup and URI format

Now add a printer using cups (localhost:631)

In cups select Kerberized Printer and the uri format is

krbsmb://DOMAIN/PRINTSERVER/PRINTER_SHARE

e.g.

krbsmb://unibz/print.unibz.it/UBZ066POS300

Continue by selecting Printer Make, Printer Driver and set the Default Options

Important DO NOT forget to get a Kerberos Ticket manually!!

Get a Kerberos Ticket


3. PRINTING VIA CUPS (using a Linux Print Server)

First get the name(s) of the available printer(s):

http://gutenberg.inf.unibz.it:631/printers

Open your preferred browser and type this address:

  • localhost:631

Follow this guides as shown on the next screen shots

Select Add Printer Enter local username (must be in admin/sudo group) and local password
Select Add PrinterEnter local username (must be in admin/sudo group) and local password
Enter Connection string e.g. http://gutenberg.inf.unibz.it:631/printers/<printername> Name, Description and Location Names
Select Make Select Driver

Last select newly added printer; Click on Administration
and select: Set Default Options


4. CHIPCARD PRINTER (using a Windows Print Server)

Your user must be a member of the admin/sudo group

SMB URI

smb://unibz/ubz02cps.unibz.it/CPSPrn01

Open your preferred browser and type this address:

  • localhost:631

Follow this guides as shown on the next screen shots

Select Add Printer from Administration Menu Enter local username and password
Select Add Printer from Administration MenuEnter local username and password
Select Windows Printer via SAMBA Enter Connection smb URI
Select Windows Printer via SAMBAEnter Connection smb URI
Name, Description and Location Names Select Make Generic
Name, Description and Location NamesSelect Make Generic
Select Printer Driver Generic Postscript Set Default Printer Options
Select Printer Driver Generic PostscriptSet Default Printer Options

Printing of private and confidential Documents

MacOS

  • Open the System Preferences
  • Open Print & Scan
  • Click on the + button to add a printer
  • Make a right click on the grey space between Windows and the search bar. Click then on Customize Toolbar
  • Drag the Advanced icon up into the toolbar and click on Done
  • Click on the new added Advanced icon in the Add Printer menu and choose the following setting:
Type: LPD/LPR Printer
Device: Another Device
URL: lpd://print.unibz.it/PRINTERNAME
e.g. Printername = UBZ098POS100; lpd://print.unibz.it/UBZ098POS100
Name: Name-of-the-Printer
Location: choose a location/description of the printer (optional); e.g. POS 2nd floor
Print using: Search for the printer via the search field and select the appropriate Printer Driver, see above and confirm with OK

Arrived at this point the printer is installed. You can close the window.

To verify the settings open in a browser this URL: http://localhost:631
When looking at the printers you might get this message: cupsctl WebInterface=yes
Open a Terminal and copy this command: cupsctl WebInterface=yes press Enter and return to the browser doing a refresh.

When printing make sure you get a Windows asking for your unibz login and password!

Troubleshooting

Windows 10

  1. Press keys: Windows+R, the run command will open, enter \\print.unibz.it
  2. A window will ask for your unibz credentials, enter them
  3. A Explorer window should open with all available printers
  4. Find the appropiate Printer and double click on it
  5. Printer Driver gets installed

Done!


List of printer names:

smbclient -L print.unibz.it -U <username> -W unibz
printer-list

Hofer Konrad 2021/10/15 12:49

/data/www/wiki.inf.unibz.it/data/attic/auth/setup_printers.1662725280.txt.gz · Last modified: 2022/09/09 14:08 by kohofer