Skip to main content
Question

Enable CUPS web portal Admin via script?


Forum|alt.badge.img+12

Any ideas on how to script this:

Seems straight forward but it looks like switching users maybe required (which I am not sure is allowed in bash), as well as using 'dsenableroot', which requires including a root password. But then doing dsenableroot -d to disable at the end.... thx, john

4 replies

Forum|alt.badge.img+17
  • Valued Contributor
  • 231 replies
  • March 30, 2017

Sorry, but straightforward though it may be, could you clarify what you want to do a bit? I take that it is something beyond simply turning the local CUPS web interface on?


Forum|alt.badge.img+12
  • Author
  • Contributor
  • 134 replies
  • March 30, 2017

Sure, just want to do:

sudo cupsctl WebInterface=Yes

Which turns on the CUPS web portal, but also allows access to the Admin area, Add / Delete printers, etc.

But, this apparently uses 'dsenableroot', as well as local admin prompts and passwords to be input.


Forum|alt.badge.img+17
  • Valued Contributor
  • 231 replies
  • March 30, 2017

If you're running it as part of a casper policy under Files and Processes or Scripts, it is run as root by default and you can simply omit the sudo call.

If you just want to give non-admin users the ability to add and remove printers, you can modify membership in the lpadmin group and not bother with the local CUPS web interface.


Forum|alt.badge.img+12
  • Contributor
  • 115 replies
  • March 31, 2017

@johnklimeck,

@joshuasee is correct, you can easily run this in the Execute Command field of a policy. It works great!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings