I can sing a ballade about current lpr-bugs... This is becomming utterly
annoying - i have been using linux for 5 years and NEVER BEFORE have i
seen such a grave bug (or is it better to say "such a beautifull bug-zoo"?)
persisting for such a long time in any linux distribution.
One of the possible rasons for the weird behaviour of hte lpr-package
could be the change in the demon-ownership:
The lpr-demon used to be started as "root.lpr" or something like that, (i
think). However, this changed and now it gets started as user which send
the print-job.
Great for the security, but jobs which are sent from a remote
machine end up beeing owned by a root and block the printer.
Look at this:
[root@marvin local]#ls -l /var/spool/lpd/local/
total 38
-rw-rw---- 1 bin lp 136 Nov 2 12:46 cfA026marvin.exp.univie.ac.at
-rw-rw---- 1 root root 75 Nov 2 12:45 cfA073lena.exp.univie.ac.at
-rw-rw---- 1 denis lp 1993 Nov 2 12:46 dfA026marvin.exp.univie.ac.at
-rw-rw---- 1 root root 16711 Nov 2 12:45 dfA073lena.exp.univie.ac.at
Both of these jobs have been submited as user denis - one localy, another
from a remote machine. This blocks the printer completely.
[denis@marvin havlik]$ lpq
HP-LJ4L is ready and printing Rank Owner Job Files Total Size
1st denis 73 (standard input) 16711 bytes
1st denis 26 (standard input) 1993 bytes
[denis@marvin havlik]$
Ha, great - here we have two "first" jobs. Well done!
[root@marvin local]# tail /var/log/messages
Nov 2 12:54:45 marvin lpd[1138]: HP-LJ4L: cfA026marvin.exp.univie.ac.at:
Permission denied
Nov 2 12:54:45 marvin lpd[1138]: HP-LJ4L: cfA073lena.exp.univie.ac.at:
Permission denied
Nov 2 12:54:45 marvin lpd[1138]: HP-LJ4L: cfA026marvin.exp.univie.ac.at:
Permission denied
I simply LOVE this.
So, if I restart the lp-demon as a root, the queued jobs get printed - i
assume on restart, lpd gets started as root, so it is allowed to do what
has to be done. Now what? Am i supposed to make the "lpd" suid root or
restart the lpd-demon from cron every hour, or what?
cu
Denis