Operating System - HP-UX
1753868 Members
7623 Online
108809 Solutions
New Discussion юеВ

print non privileaged file

 
SOLVED
Go to solution
suju
Advisor

print non privileaged file

How a normal user can print a file owned by a lp user
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: print non privileaged file

Shalom,

chmod a+r filename

That will give enough access to read or print.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
suju
Advisor

Re: print non privileaged file

Thanks Sen
But these file are created after giving lp command by another user & I wanted to take the printouts of these request(/usr/spool/lp/request/lp/*) on another printer & I cant change the owner of these files in a script which I am running from a normal user .profile file, though i have a root password.
OldSchool
Honored Contributor
Solution

Re: print non privileaged file

If I correctly understand, you want to change the destination of a an "lp" command issued by another user? If so, see the "lpalt" section of the lp man page. root access *is* required, or you have to be the user that issued the initial "lp".

NOTE: There may be issues if the original printer and the destination are dissimilar printers. I can't test that as everything here is config'ed as an lj4 (even when they aren't really)

http://docs.hp.com/en/B2355-90689/lp.1.html
suju
Advisor

Re: print non privileaged file

Actually I have written a script in which according to the type of print file (Yacc,lex, text) I am doing some manipulation in the request files & then I am giving the lp command to these files, everything is working fine if I run this script from root, But I have to run this script thru normal user .profile, In that case a particular Lex file is having a user & group lp, for which I cant access(Cant issue lp cammand to that file again) from a normal user.
Pls help
Thanks
OldSchool
Honored Contributor

Re: print non privileaged file

ok...see your other post regarding "priv command in profile" and sudo
suju
Advisor

Re: print non privileaged file

Thanks to all of you