[cups] sudo from lp account

Michael Sweet msweet at apple.com
Thu Sep 15 12:13:16 PDT 2016


What you are trying to do is not secure and (hopefully) cannot be done so easily...  Better to have a local service running as the desired user that is able to accept connections/requests from the driver script.


> On Sep 15, 2016, at 3:01 PM, Narcis Garcia <informatica at actiu.net> wrote:
> 
> Hello, I'm trying to use with Debian 7 and Ubuntu 14.04 the feature of
> adding a new printer to be treated through a ShellScript:
> 
> $ lpadmin -p "Epson1" -v file:///dev/null -i /tmp/driver.sh -E
> 
> This driver script is called by CUPS as "lp" user, when OneUser prints
> something to "Epson1".
> The script needs to perform a task as another user account, and I'm
> trying to perform this with "sudo". I've added this line to sudoers:
> lp ALL = (OneUser) NOPASSWD: /etc/cups/interfaces/*
> 
> The problem is that the execution hasn't permission to access
> /etc/sudoers and "sudo" cannot grant permission for another's user
> execution~session.
> 
> How can I reconfigure this behaviour?
> 
> Thanks.
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://lists.cups.org/mailman/listinfo/cups

_________________________________________________________
Michael Sweet, Senior Printing System Engineer




More information about the cups mailing list