Operating System - HP-UX
1829845 Members
1976 Online
109993 Solutions
New Discussion

lp device /dev/null on 11i

 
John Flanagan
Regular Advisor

lp device /dev/null on 11i

I can't set the printer device to /dev/null on HP-UX 11.11. This worked on 10.20.

Have I configured my system incorrectly or has there been a change?

Regards,

John.
14 REPLIES 14
Cheryl Griffin
Honored Contributor

Re: lp device /dev/null on 11i

What is the error or problem?

Check that /dev/null has the correct major/minor number, permissions, owner, group:
# ll /dev/null
crw-rw-rw- 1 bin bin 3 0x000002 Mar 5 01:11 /dev/null

Cheryl
"Downtime is a Crime."
Steve Steel
Honored Contributor

Re: lp device /dev/null on 11i

Hi

It works on my 11i

printer with non standard device file.

How do you do it


steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
John Flanagan
Regular Advisor

Re: lp device /dev/null on 11i

Hi,

Cheryl, /dev/null is correct.

Seve, I use the same method to add the printer.

This is the error I get from sam :-
Lp destination "visbsh3" does not exist on ptihp2.

The printer is still created but won't accept requests. When I try to tell it to accept requests I get the following entries in the log file:-
FIFO: Mar 5 12:20 n

Regards,

John.

Steve Steel
Honored Contributor

Re: lp device /dev/null on 11i

Hi


Use lpadmin -xprinter

to remove it and then try again to make it.

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

Re: lp device /dev/null on 11i

Sounds like a permissions, owner, group problem. If it is lpadmin might fail also. Replace printer with your printer name.
chmod 644 /etc/lp/member/printer
chown lp:lp /etc/lp/member/printer
chmod 755 /var/spool/lp/request/printer
chown lp:lp /var/spool/lp/request/printer
chmod 755 /etc/lp/interface/printer
chown lp:bin /etc/lp/interface/printer
"Downtime is a Crime."
Bill Hassell
Honored Contributor

Re: lp device /dev/null on 11i

Make sure that /dev/null looks like this:

crw-rw-rw- 1 bin bin 3 0x000002 Mar 5 07:57 /dev/null

Someone logged in as root may have accidently removed this device file and then run a script or program that wrote to it. This action would create a standard file rather than the required device file (and will begin to occupy a lot of space in /dev).


Bill Hassell, sysadmin
John Flanagan
Regular Advisor

Re: lp device /dev/null on 11i

Hi,

I have checked the permisions and then removed and added the printer but this makes no difference.

The errors are still the same.

John.
Steve Steel
Honored Contributor

Re: lp device /dev/null on 11i

Hi

lpshut

lpsched -v

try printing

then
disable printer
reject printer
accept printer
enable printer

print again

Post the contents of /var/adm/lp/log and the output of lpadmin -t

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

Re: lp device /dev/null on 11i

Hi

of course lpstat -t


I have still no problems so it could be permissions.


Run the added script

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

Re: lp device /dev/null on 11i

Hi

of course lpstat -t


I have still no problems so it could be permissions.


Run the added script

steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
John Flanagan
Regular Advisor

Re: lp device /dev/null on 11i

output of log using lpsched -v

John.

***** LP LOG: Mar 5 14:13 *****
FIFO: Mar 5 14:13 d email
FIFO: Mar 5 14:14 e email
FIFO: Mar 5 14:14 r email 7 root ptihp2 0
email-7 root email Mar 5 14:14
CHILD: Mar 5 14:14 email 7 0000
FIFO: Mar 5 14:14 m email -1
FIFO: Mar 5 14:14 r email 8 fngj ptihp2 0
email-8 fngj email Mar 5 14:14
CHILD: Mar 5 14:14 email 8 0000
FIFO: Mar 5 14:14 m email -1
FIFO: Mar 5 14:15 n
Steve Steel
Honored Contributor

Re: lp device /dev/null on 11i

Hi

Looks perfect to me.

What do you expect it to do


steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)
John Flanagan
Regular Advisor

Re: lp device /dev/null on 11i

Hi Steve,

I found 2 differences on file permisions and I changed them to match your script.

/var was 555 now 755 and

/var/spool was 555 now 755
owner was bin now root
group was bin now sys

This did not make any difference.

I should point out that this is a clean install and no users have had access to the system yet.

also

The accept command works from the command line but does not work from SAM.

Regards,

John.
John Flanagan
Regular Advisor

Re: lp device /dev/null on 11i

Hi,

What do I expect?

Main use is:- our ERP system sets up 4 batch queues in a class called VISBSH and uses this to execute offline jobs (not more that 4 at a time).

My second use is:- Using print queue email users can set a job to run and print and receive the output in their e-mail when it completes.

John.