Cups Add Printer

Hi to the group,
I am new here
I manage to do to many things with dietpi that i cant believe i do it.

I have a problem add my printer to Cups Server.

My Printer is KYOCERA ECOSYS P5021cdn
When i go to AddPrinter in web interface i get

Add Printer Error

Unable to add printer:

Forbidden

I search the internet and i found that for some reason i must create a group and add the admin user in /etc/cups/cupsd.conf

I do it, I restart the CUPS and i continue get the same error

Can anybody knows how can i solve the problem?
Thank you

Welcome to our community.

Did you used dietpi-software to install cups? I did a test and for me adding a printer is working without issues.

Usually you should be able to open admin page under https://your.local.ip:631/admin/

There you have the add printer button which should open a login page

Were did you get the error message exactly?

Thank you @Joulinar for your fast response

I go to the https://mylocal.ip:631/admin/ i press the “add printer” button i add the pass and the i get the above error.

did you installed CUPS using dietpi-software? Can you share your /etc/cups/cupsd.conf file? If the file is to long to copy into a single post, just save it as *.txt and attach it to the post.

Yes i install the CUPS and here the cupsd.conf file
cupsd.txt (6.3 KB)

are you trying to access CUPS from a local network or from a remote location?

From local network, from raspberry i install the dietpi

i’m not able to replicate your issue. Can you try following

systemctl stop cups
rm /etc/cups/cupsd.conf
curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.conf/dps_187/cupsd.conf -o /etc/cups/cupsd.conf
systemctl restart cups

Does this change anything?

Sorry the same error again .
Here a screen copy

did you execute all 4 lines one by one or just the restart?

All lines one by one with sudo

and you are using the root user to login on CUPS admin page?

Yes
The root user i use

I’m able to replicate this behaviour if I use a different user than root on the CUPS admin login page.
image

As soon as I’m switching to root all is fine and I’m getting the add printer page
image

Let me check again maybe i do it all wrong

Ok here what i do
I dont know why but

I remove the nginx server and i install the lighttpd
And the problem solved.

I dont now how but it works and found all my network printers.

Thank you for your help @Joulinar

There should be no relationship between the web server and CUPS as cups is running it’s one web stack on its own port. You could even remove the web server completely.