Lpadmin(1M) rejects devices writable by lp


 
Thread Tools Search this Thread
Operating Systems HP-UX Lpadmin(1M) rejects devices writable by lp
# 1  
Old 09-13-2010
Lpadmin(1M) rejects devices writable by lp

When we executed a lpadmin command, the following error was output.

# lpadmin -phsaprinter -v/home/hoge/lpfile -mrmodel -ocmrcmodel
-osmrsmodel -ormhsaprinter -orphsaprinter
lpadmin: can't access file "/home/hoge/lpfile"

/home/hoge/lpfile is the file other user made.
The permission of this file is 664.

# ll /home/hoge/lpfile
-rw-rw-r-- 1 root sys 13 Aug 9 10:22
/home/hoge/lpfile

The owner group is "sys".
but group "sys" has as a secondary group "lp".

# cat /etc/group
:
sys::3:root,uucp,lp?<< add a lp user
:

In this settings, I think that it can write to /home/hoge/lpfile.
However, the error was output.

Problem Analysis:
I changed the permission of the file from 664 to 666.
and the error is not output.

# chmod 666 lpfile
# ll /home/hoge/lpfile
-rw-rw-rw- 1 root sys 13 Aug 9 10:22
/home/hoge/lpfile
# lpadmin -phsaprinter -v/home/hoge/lpfile -mrmodel -ocmrcmodel
-osmrsmodel -ormhsaprinter -orphsaprinter
# <<< Error is not output.

When I changed the owner(or group) of the file to lp, the error is
not output, too.



I found the man page of lpadmin(1M).
It have the following.

# man lpadmin
:
-vdevice Associates a new device with printer P.
device
is the pathname of a file that is
writable by
the LP administrator lp. Note that
there is
nothing to stop an administrator from
associating the same device with more
than one
printer. [...]


I think that I should be able to execute the command lpadmin(1M)
without becoming an error even in the state of permission 664 if
there is lp user in the owner group of the file.



I checked this test by 11.31, and this error was output.
</quote from 4000215408>
<quote>
Customer Company: HITACHI
Customer Handle: HITACHI-SOFT
Customer Contact: +81-45-862-8422
Customer Email: csite_9v@soft.hitachi.co.jp
Severity: Serious
Urgency: High: Problem reported by major ISV
Desired Solution Types: Generally Available Solution (GR patch needed)
Found in Versions: (11.23 11.31)
</quote>
# 2  
Old 10-05-2010
Hi,

What is the permission of /var/sam/lp and its
sub-directories?

Are the entries in the /etc/printcap
correct?


An example of a correct entry into an /etc/printcap file is as follows:

Quote:


#lpfile:\
# :lp=file:sd=/export/dazel/os310/var/lpgd/lpfile:dz=-start-sheet none:

lp8:laserprinter:\
:lp=laser8Smilief=full:h1:mx#10:sd=/var/spool/lp8
#printSmilierint:\
# :lp=printSmilief=brief:hl:mx#10:sd=/var/spool/lp8

-DB
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run shell script LPADMIN

Hi All, I'm new to shell scripts. I have the following LPADMIN script that runs ok when I run in in OSX Automator "Run shell Scripts": Shell: /bin/bash here is the line: /usr/sbin/lpadmin -p Copy-room-ljetP4015 -E -v lpd://192.168.1.1 -m /Library/Printers/PPDs/Contents/Resources/HP\... (3 Replies)
Discussion started by: abk
3 Replies

2. UNIX for Advanced & Expert Users

problems with lpadmin usage

the problem i encountered is that lpadmin when encounters a failure doesn't cleanup properly .so the next time i use the same printer name it doesn't allow me to do so .saying interface directory can't be created .what can be done to solve this out ?please help .. (3 Replies)
Discussion started by: rahulpatro
3 Replies

3. Shell Programming and Scripting

Variables containing spaces in lpadmin

I apologize for the long post. I have a lot of info... I am trying to write a script that will add a network printer (or several) to a system using information read in from a text file. My problem is the spaces in the PPD file name, I'm not sure how to put the file name in or how to read it back... (2 Replies)
Discussion started by: HalfNube
2 Replies

4. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies

5. AIX

make a recovery CD/DVD - system has no writable devices

Hi, Has anyone please got some advise as to how I can make a CD/DVD on an AIX 5.3 system so that it can be fully recoverd just by inserting the backed up system. The system that I need to recover has no writable devices, not even a tape drive (it wasn't specified by me btw). I am trying to... (0 Replies)
Discussion started by: stevek007
0 Replies

6. UNIX for Dummies Questions & Answers

Lpadmin and viewing printer settings

Hi - Dummy question #1.... We either use the Hewlett Packard HPPI too or LPADMIN command to setup out printers. Is there an LPADMIN command that will show you the default config of a particular printer. Ideally looking to see default font, CPI settings etc. Thanks. BravehearT1326 ... (1 Reply)
Discussion started by: BravehearT1326
1 Replies

7. Solaris

configuring printer using lpadmin

Can some one tell me how to configure the printer on solaris printer name = A printer server address : 172.21.19.6 (3 Replies)
Discussion started by: krishan
3 Replies

8. UNIX for Dummies Questions & Answers

Ooops there goes lpadmin =0

Hi there thanks for checking in I'm screwed if you can't help me. I have root access to a unix box and i did this. >/usr/bin> mailx marcus@rtt.co.za > /usr/bin/lpadmin which over wrote the lpadmin file which is in /usr/bin How do i get this back. Please help. (2 Replies)
Discussion started by: nemex
2 Replies

9. UNIX for Dummies Questions & Answers

lpadmin help

hi all, I can add a network printer with ADMINTOOL. However, I have a problem to add a network printer using lpadmin on my Sparc Solaris 8 box. Here's the detail: =============== lpadmin -p printername lpadmin: ERROR: Missing -U or -v option. To Fix: Local printer must have a port... (2 Replies)
Discussion started by: andrec
2 Replies
Login or Register to Ask a Question