How to run CUPS as non-root user

You have to add your non root user to the appropriate group
What group would that be? Would there be any broken functionality in CUPS if it is run as a non-root user?
 
By following the instructions in https://docs.freebsd.org/en/articles/cups/, I installed print/cups and started the cupsd daemon. However, I noticed that the cupsd process runs as root. Does CUPS really need superuser privileges to print documents? If not, how do I make cupsd run as a less privileged user?
You do need superuser privileges to add a printer so that CUPS can 'see' it. But after that, regular users can print.

Don't worry about the CUPS server running as root or whatever. Just start the daemon, go to https://localhost:631, add the printer, and be on your merry way. If you follow the instructions correctly, CUPS should work - as in, you can make printouts as a regular user.

Don't go looking for problems when there are none.
 
I think you could try modifying /etc/rc.conf to include something like:-
Code:
cupsd_user="YourUserName"
before the
Code:
cupsd_enable="YES"
if there is an entry for that.
 
I think you could try modifying /etc/rc.conf to include something like:-
Code:
cupsd_user="YourUserName"
before the
Code:
cupsd_enable="YES"
if there is an entry for that.
Disagree with that. Check /etc/passwd, there will be an entry for a special cupsd user... I strongly suggest not messing with that stuff, and go with known defaults provided by the CUPS port. Otherwise, it will be a pain to figure out what else to adjust so that the change even makes sense and works as intended.
 
  • Like
Reactions: bjs
I don't use CUPS, but my guess is that, like many daemons, it start as root to bind to its low port and and then drops privileges.
 
Back
Top