[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CUPS permissions



On Thu, Aug 26, 2021 at 01:37:49PM +0100, Brian wrote:
> On Thu 26 Aug 2021 at 13:23:58 +0100, mick crane wrote:
> 
> > On 2021-08-26 12:59, Peter Ehlert wrote:
> > > On 8/25/21 12:11 PM, Greg Wooledge wrote:
> > 
> > > > Some people report restarting the browser is enough.  Some claim they
> > > > have to reboot.  Who knows.
> > > > 
> > > thanks. restarting firefox worked.
> > > I got the login dialog box
> > > 
> > > after login as (user)
> > > Add Printer gives> Unable to add printer: Forbidden
> > > 
> > > back to square one
> > 
> > I've got a print server working but I've forgotten how.
> > added a new printer a year or so ago.
> > Might have been lpadmin or something.
> > I do know always have to reboot after making changes.
> 
> Rebooting after adding a printer is *never* needed.

Agreed.

I suspect there's some *really* basic misunderstanding going on at some
level.  Let's start from the beginning.

In order to administer a printer in CUPS, you do the following things:


1) Make sure the root account has a PASSWORD.  Make sure you know it.
   Access to sudo doesn't count.

2) Install cups.

3) Visit http://localhost:631/ in a GUI web browser.  Make sure Javascript
   is allowed.

4) At some point, when you try to do stuff to the printers in the browser,
   you will be prompted for a username and password, using HTTP basic
   authentication.  When this occurs, you should login as root, using
   root's password.

5) If you screwed up and logged in as yourself, restart the web browser
   so that you can get the HTTP basic authentication dialog box again.  Go
   to step 4.

6) Once the printer is set up via the browser, you should be able to see
   it and print to it from the command line.  "lpstat -t" to see all of
   the printers and their status.  "lp" or "lpr" to print a text file.


Any variants on this procedure will require knowledge that I don't
personally possess.  E.g. if for some reason you refuse to set a root
password, then you may have to set up a printer-admin account which
has the appropriate privileges, and a password, and then use that
instead of root.  I don't know what those privs would be.


Reply to: