Operating System - HP-UX
1834802 Members
2751 Online
110070 Solutions
New Discussion

root can't print, others can

 
JUP
Regular Advisor

root can't print, others can

I am running HPUX 11.23 on Itanium.
I have set up a network printer. All users can print OK to it, however the root user cannot print. The print job from the root user can be seen in lpstat however does not go to the printer.

I have looked in /var/adm/lp/log file and get the following entry whenever root attempts to print:

lpsched: invalid parameters

However when another user prints, it prints ok.

Does anyone know what could be causing this problem.

Thanks in advance
JUP
13 REPLIES 13
Steve Steel
Honored Contributor

Re: root can't print, others can

Hi


Bad path


Try /usr/bin/lp when printing as root


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
RAC_1
Honored Contributor

Re: root can't print, others can

what is the command that you use??
There is no substitute to HARDWORK
TwoProc
Honored Contributor

Re: root can't print, others can

Check that root has write permission to /dev/null, it may have gotten changed...
We are the people our parents warned us about --Jimmy Buffett
Rick Garland
Honored Contributor

Re: root can't print, others can

It will take root to add the printer, or at least membership in the 'lp' group. On my ia64 systems I have root in the 'lp' group.

Other thing to look at would be the $PATH as memtioned.
JUP
Regular Advisor

Re: root can't print, others can

Thanks for everyones replies, however still no luck.
Here are answers to your questions:

#echo $PATH returns:

/bin:/usr/bin:/sbin:/usr/sbin:.

#which lp returns:

/bin/lp

#ls -al /dev/null returns:

rw-rw-rw bin bin /dev/null


#ls -al /bin/lp /usr/bin/lp returns

r-sr-xr-x root bin /bin/lp
r-sr-xr-x root bin /usr/bin/lp

both lp are same size and no diffs exists.

Any other ideas would be appreciated.

Only root does not print, the job stays in the queue but when I login or 'su' to another user that user prints

Thanks in advance
JUP

JUP
Regular Advisor

Re: root can't print, others can

BTW - root is in the lp group.
A. Clay Stephenson
Acclaimed Contributor

Re: root can't print, others can

Rather than doing an lp myfile as root do a cat myfile | lp and see if that works. It's possible that you are under a very restrictive mountpoint as root that the lp daemon can access and cat'ing the file will take care of that. I don't think that is really your problem. I'm leaning towards a difference in environments, especially lp related env vars (PRINTER,LPDEST,LC_*). Man lp and look under EXTERNAL INFLUENCES for these variables and then do an env as root and as a regular user and compare them. Root is never denied permission so this can't be a permissions problem. By the way, "type lp" is a more definitive test than "which lp" for determining the actual connand that will be executed.
If it ain't broke, I can fix that.
JUP
Regular Advisor

Re: root can't print, others can

Unfortunately still no luck with this one.

When I run hppi (jet driver for network printer) from root and select diagnostics and print a test page it prints OK. What does the jet driver do differently that the lp command ?

But when I run it through lp from the unix prompt it does not work. The print job actually goes to the print spooler and shows up when I do a lpstat -t.
However it never leaves the spooler. When another job is sent by another user it goes to the printer.


Thanks for the replies so far and further assistance would be greatly appreciated.

Thanks
JUP
Robert-Jan Goossens
Honored Contributor

Re: root can't print, others can

JUP,

double check your /dev/null file.

# ll /dev/null
crw-rw-rw- 1 bin bin 3 0x000002 Apr 1 16:01 /dev/null
# file /dev/null
/dev/null: character special (3/2)

Looks like yours is a regular file.

Robert-Jan
JUP
Regular Advisor

Re: root can't print, others can

Thanks Robert-Jan,

however the /dev/null is exactly the same as the way you had it in your listing.

One of my earlier posts was just showing a summary of the listing of /dev/null.

Any other thoughts ?
JUP
Tiffany Rawls_4
New Member

Re: root can't print, others can

Did you ever get an answer to this problem. I am having the same problem with another user.
JUP
Regular Advisor

Re: root can't print, others can

No unfortunately not.

Still having problems with root not being able to print.

The only way around it for now is to chmod the file from root so other users can access it then log out and login as another user to print it.

If you find the solution, please post it here.

Thanks
JUP
Ermin Borovac
Honored Contributor

Re: root can't print, others can

Have you tried tracing lpsched with tusc? It may help you find the problem.

If you don't have tusc you can get it from here.

ftp://ftp.cup.hp.com/dist/networking/tools/tusc.7.7.ia64.shar

You can run attach to running lpsched as root

# tusc -o /tmp/tusc.out -ccc -f -l -n -p -E -v -T%T -b 80 -r all -w all

Then check tusc.log or post it here.