Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can only print to HP jetdirect printer when logged in as root 1

Status
Not open for further replies.

countblack

Technical User
Oct 9, 2001
3
GB
I have a server, which has several HP jetdirect printers attached to it using the lp print service to print. My other printers print as normal. The system suffered a hardware crash a couple of weeks ago and i have been unable since to make one of the HPs print since. I can print when logged in as root, but if i try printing as a user the job just sits visably in the queue forever. I assumed this would be a permission problem and have run 'verify system' and fixperm. Verify system showed 20 or so problems but nothing out the ordinary. Fixperm showed 6 or so errors which i manually fixed, but still with no joy. I have manually checked the permissions for the interface files relating to this printer but still can't get it to work. Just wondering if anyone has any ideas. Incidently i have tried removing and readding the printer with a different name and this did not work either.

Cheers
 
check out the Technical article at Caldera

TA#107455

Problem
Root can print, but users can't print. Remote line printing (rlp) is in place. User's can't print locally.

Cause
There are two possible causes for this.
1) When mkdev rlp is run to set up remote printing, the files, lp, lpstat, and cancel are copied from the directory /usr/bin to /usr/lpd/remote using the 'cp' command. The 'cp' command changes the owner and group to root/other. The owner and group on these files need to be bin/lp respectively, in order for users to be able to print locally.

2) Fixperm and or fixmog changes the permissions on the new lp/lpstat/cancel binaries in /usr/bin back to their original pre-remote line printing state.

 
Thanks for the response. However this hasn't solved my problem. I have run fixperm and fixmog, fixmog brought back 30-40 errors, some of which were lp related. They were all fixed, however still no printing. My other jetdirected HP printers on this server are working fine.
 
fixperm and fix mog were only mentioned above: the technical article goes into a bit more detail on several possible solutions

Solution
Cause #1
There are two solutions to this problem that should be implemented.

Immediate Solution:


# cd /usr/lpd/remote
# chown bin *
# chgrp lp *


Also make sure the permissions on /usr/lpd and /usr/lpd/remote directories are as follows:

drwxr-xr-x root other /usr/lpd
drwxr-xr-x root other /usr/lpd/remote


With this change, users should be able to print. If you need to add more users, use the command, rlpconf.
Permanent Solution:

This solution will correct the problem if you have to run mkdev rlp in the future. THIS DOES NOT SOLVE THE PROBLEM OF RUNNING MKDEV RLP TWICE AND NOT REMOVING IT IN BETWEEN. Fixperm does not resolve this issue either. Once rlp is in place you should use /etc/rlpconf to add in new printers.

To correct the problem permanently, modify the script, mkdev rlp:


1. cd /usr/lib/mkdev
2. vi rlp
3. Find the section of the script you see below:

For SCO TCP/IP Release 1.2.0:
=============================
echo "Saving lp, cancel and lpstat commands to $WORKDIR"
cd $BIN
cp lp $WORKDIR
cp lpstat $WORKDIR
cp cancel $WORKDIR
=============================


For SCO TCP/IP Release 1.2.1:
=============================
# Save old rlp commands
[ ! "$_no_prompt" ] && echo "Saving lp, cancel and lpstat commands to $WORKDIR"
for i in lp lpstat cancel
do
cp /usr/bin/$i $WORKDIR
done
=============================

4. Modify the command "cp" command(s) to "mv" commands.
For example:

mv lp $WORKDIR
mv lpstat $WORKDIR
mv canecl $WORKDIR


<or>

mv /usr/bin/$i $WORKDIR

5. Save the file.


Cause #2
NOTE: This should only be done if rlp is installed, and it is expected to remain installed permanently.

This is a two step solution process.

1. To correct the immediate problem run the following commands:


cd /usr/bin
chmod 6711 lp lpstat cancel
chown root lp lpstat cancel
chgrp daemon lp lpstat cancel


2. Intermediate Solution:
This solution will let you run fixperm with the original lp, lpstat, and cancel in /usr/bin. We move the binaries back to their original home, run fixperm, and then move them back to /usr/lpd/remote.


a. Run mkdev rlp as root. Say 'yes' to the question,
&quot;Do you want to remove /usr/lpd/remote?&quot; Answer
questions 2 & 3 with 'no'. This way the configured
printers will not be removed.

The original files will be moved back to /usr/bin.

b. Next, cd /
Run fixperm for the problems and test.

c. Once fixperm etc. is run, then just run mkdev rlp
again and install it. The files (lp, lpstat, and cancel)
will be moved back to /usr/lpd/remote and the lpd portion
of these files will be moved back into /usr/bin.


3. To permanently prevent fixperm and fixmog from corrupting the permissions again, the reference files need to be modified.

Fixperm: Find the entries in /etc/perms/ext for the three
binaries listed in (1) and edit those lines to
reflect the correct mode, owner and group.

Example

Before:

LPR sx2111 bin/lp 1 ./usr/bin/lpstat X02

After:

LPR sx6711 root/daemon 1 ./usr/bin/lpstat X02
^^ ^^^^ ^^^^^^
Fixmog : Find the entries in /etc/auth/system/files for the
three binaries listed in (1) and edit those lines
to reflect the correct mode, owner and group.

Example

Before:

/usr/bin/lpstat:f_owner=bin:f_group=lp:f_mode#02111:f_type=r:
After:

/usr/bin/lpstat:f_owner=root:f_group=daemon:f_mode#06711:f_type=r: ^^^^ ^^^^^^ ^^

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top