l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2005 Oct 15 12:11

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] CUPS on FreeBSD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] CUPS on FreeBSD



Jeffrey J. Nonken wrote:
One question before we start... should I or should I not be running lpd while trying to use CUPS? I've got conflicting and unclear information on that. Is CUPS supposed to be handling all of it, or does it need a spooler?
CUPS emulates lpd.  The instructions you said you had followed
pointed out that you would have to mv the lpd commands in /usr/bin
so that the CUPS equivalents from /usr/local/bin would get invoked
instead from later in the PATH.

On Wed, 12 Oct 2005 08:57:23 -0700, Jeff Newmiller wrote:

Jeffrey J. Nonken wrote:

On Mon, 10 Oct 2005 10:01:31 -0700, Jeff Newmiller wrote:

[...]


In my case, verifying that the UID that the filters run under
(listed in cupsd.conf) have appropriate permissions was the
most challenging thing to get working right.  The CUPS daemon
runs as root, but runs actual print jobs as a lower-privilege
user.

I've spent two days on this and I've gotten almost nowhere. If
the next part is the _challenging_ bit, maybe I should throw in
the towel now.

Sorry, I couldn't help but laugh at that. :-/

No, that's good. Laughing is good.

However, I have set filters permissions according to
instructions, FWIW. Whether that's an issue remains to be seen.
Ah, but have you verified that the appropriate users have
permissions they need?  I don't know how FreeBSD handles USB, but
the UID that CUPS runs under has to be able to access the device,

I'm still feeling my way around this, but I think this means CUPS itself is running as root:

UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND
0 417 1 0 96 0 4944 3396 select Ss ?? 0:00.17 /usr/local/s
Yes, cupsys runs as root... but the cupsd.conf file tells it what
username to run filters as to minimize security exposure.  That user
is who has to have privileges set properly.

-bash-2.05b$ ls -l /dev/ulpt0
crw-r--r--  1 root  operator  241,   0 Oct 12 10:37 /dev/ulpt0
So you have to make sure that the UID that the CUPS filters run
under is a member of the "operator" group.

I have been assuming you read my CUPS post from recent archives...
http://www.mail-archive.com/vox-tech@lists.lugod.org/msg11029.html
though that was perhaps not a good assumption.

I'm not sure that this is relevant (yet) since the problem of CUPS not respond happened _before_ I tried adding a printer. The printer device not being accessible can't possibly affect my ability to to connect to CUPS ex-post-facto.
It can affect connections if cupsys refuses to run due to permissions
problems.

I have done one thing since my last message: I went into client.conf and explicitly added the local hostname as ServerName, and did the same to cupsd.conf, even though the comments claim it uses that name by default. Once I added it to client.conf I was able to connect implicitly to cups via lpstat and lpadmin, so I assume I did something right.
I suppose... though I am using the default setting for that.

aphrodite# lpstat -a
5850 accepting requests since Jan 01 00:00
HPLJ5850 accepting requests since Jan 01 00:00
aphrodite# lpstat -s
system default destination: 5850
device for 5850: usb:/dev/ulpt0
device for HPLJ5850: socket://192.168.0.52
The HPLJ5850 seems wrong... going to a socket on your own ip address is
a circle with no end.  That is what you do to print to devices attached
to another host.

However, I still can't see anything in the Device pulldown menu when I try to add a printer via the web interface, nor can I see the two printers I've added via lpadmin. And I can't seem to do anything like actually printing. So there's still mischief afoot. But it is a step forward.


as well as the printer directories in  /var. (Kubuntu moved the
default conf file from the CUPS-recommended directory structure
into the /etc to conform with Debian standards, but that mostly
changed how I dealt with multiple types of printers.)

Anyway, you didn't make your conf file available, so I haven't been
able to offer any help with that.

One other thing... if you are trying to use a printer you added
before you stabilized your cupsd.conf file, you might want to try
deleting that one and adding it again.

I haven't really stabilized it, mostly I looked through it and decided that the defaults would work. I was going to follow your earlier advice and go through it line by line, I just haven't had an opportunity yet. I think I'll do that before I toss it in your direction. Get all the simple stupid stuff out of the way and take care of anything you couldn't possibly know without examining my system -- like conflicts between default and actual directories. I believe that FreeBSD also moved some things to conform to its own standards.

I would expect a properly ported utility to have that done, but that doesn't mean it's so. So I will kick those assumptions out and take care of that before asking more stupid questions.
I am only slightly ahead of you... such that I am not sure which
of your questions might have been stupid.  I was certainly not expecting
to have to get as deep into CUPS as I had to, given its friendly face.

--
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.