Kali Linux Printer Setup

From WikiMLT
Revision as of 12:58, 19 August 2022 by Spas (talk | contribs)

In my case I was in need to set­up my HP 1022 print­er to work with Kali Lin­ux. Af­ter the fol­low­ing set­up it works great. In this guide are used the tools cups, cups-client and foomat­ic-db, which are not in­stalled and en­abled by de­fault in Kali Lin­ux.

In­stall the re­quired Pack­ages and Deal with the Per­mis­sions

In­stall the re­quit­ed pack­ages

sudo apt update
sudo apt install cups cups-client "foomatic-db"

The users will be added to the lpad­min group au­to­mat­i­cal­ly af­ter in­stalling the above pack­ages, but we will do that man­u­al­ly just in case.

sudo adduser root lpadmin
sudo adduser $USER lpadmin

En­able and start Cups ser­vice.

sudo systemctl enable --now cups.socket
sudo systemctl enable --now cups.service

Restart Cups and Sam­ba ser­vices.

sudo systemctl restart cups.service
sudo systemctl restart smbd.service

Find USB Print­er

lsusb | grep 'HP'
Bus 001 Device 003: ID 03f0:2c17 HP, Inc LaserJet 1022
sudo netstat -pnat | grep 631
tcp      0    0 127.0.0.1:631    0.0.0.0:*   LISTEN      1217/cupsd          
tcp6     0    0 ::1:631          :::*        LISTEN      1217/cupsd

Ref­er­ences