Skip to contentSkip to conversation

lpd user woes

DISCUSSION Mat Harris 1 participant 3 messages Feb 11, 2003 1 message not in the archive

lore
Share & tools
lore

Mat Harris

author
#0 lore raw

I am running redhat 8.0 and I would like to get lpd running as root, not lp.

I know you all want to warn me about the dangers, but seeing as I am normally the first to warn, you can skip that step.

I am trying to get an entry in printcap to pipe the print job to mpg123 on stdin to make an mp3 printer. I have it all working except when I print and view the log, i see that the lp user couldn't access the sound device, with the error:

no suitable libao driver found (device is in use?)

This happens on every box i have so it is not a localised issue.

Please can someone either tell me how to give lp access to the sound device, or how to make lpd run as root.

cheers

Signature · 2 lines
Mat Harris			OpenGPG Public Key ID: C37D57D9
[email protected]	www.genestate.com	
author
#2 lore raw
In reply to a message not in the archive
Quoted 4 lines · John Hallam

Does it happen if you do `su lp' as root and then execute the code
that the lp user tries to execute? It might be that the environment (PATH variable etc.) presented by lpd to its sub-processes is missing some vital piece of information...

if i do su - lp it does exactly the same

btw, the code i run for testing is cat test.mp3 | mpg123 -

Quoted 4 lines

You could give the lp user group access to the sound device, by
changing the ownership and permissions on the sound device or by changing the group membership possibilities for lp in /etc/groups. Either of these may have other consequences.

i have changed /etc/passwd so the group for lp is 0 and changed /etc/groups so lp is a member of root but i still have to same problem.

Signature · 2 lines
Mat Harris			OpenGPG Public Key ID: C37D57D9
[email protected]	www.genestate.com	
author
#3 lore raw

There are no differences between the su and su - environments.

I have found a workaround for now, which is setting the uid for lp to 0 i /etc/passwd but this is (hopefully) only temporary. If anyone knows how to get lp to access the sound device or lib, please spill.

for now: SOLVED;

Quoted 21 lines · Mat Harris
Quoted 4 lines · John Hallam

Does it happen if you do `su lp' as root and then execute the code
that the lp user tries to execute? It might be that the environment (PATH variable etc.) presented by lpd to its sub-processes is missing some vital piece of information...

if i do su - lp it does exactly the same

btw, the code i run for testing is cat test.mp3 | mpg123 -

Quoted 4 lines

You could give the lp user group access to the sound device, by
changing the ownership and permissions on the sound device or by changing the group membership possibilities for lp in /etc/groups. Either of these may have other consequences.

i have changed /etc/passwd so the group for lp is 0 and changed /etc/groups so lp is a member of root but i still have to same problem.

Signature · 2 lines
Mat Harris			OpenGPG Public Key ID: C37D57D9
[email protected]	www.genestate.com	
Signature · 2 lines
Mat Harris			OpenGPG Public Key ID: C37D57D9
[email protected]	www.genestate.com