LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 10-01-2009, 01:33 AM   #1
robjacox
LQ Newbie
 
Registered: Jan 2005
Location: Bend, OR
Posts: 7

Rep: Reputation: 0
Parallel Port access issues


I am a fairly newbie, but can usually figure things out on my own. This one has me stumped.

I am using Mepis 8, so far the best distro I've tried. It networks with Vista (dreaded kid's computers), and all the hardware I need, or almost.

I am using a printer hooked up to my parallel port (due to USB ports used by everything else), and am using CUPS.

Forgive me, but I'm not to keen on the chmod ownership values, but in order to use the printer, I have to manually change the ownership of /dev/lp0 to allow for "others" to read/write. By default "owner" and "group" can read and write, but "others" are forbidden.

After changing the permission, I have to restart CUPS, then restart the printer, all is well after that.

This is fine until we have a power outage or for some reason the computer restarts, then no one can print until I "fix" it.

If I go into a terminal as root, and chmod /dev/lp0 to 777, when I reboot, it reverts to whatever (770?).

Any ideas?
 
Old 10-01-2009, 01:58 AM   #2
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Blog Entries: 4

Rep: Reputation: 80
Hello,
try & use the cups homepage
http://localhost:631/
It should be in one of the menus
cheers
 
Old 10-01-2009, 10:17 AM   #3
robjacox
LQ Newbie
 
Registered: Jan 2005
Location: Bend, OR
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nigelc View Post
Hello,
try & use the cups homepage
http://localhost:631/
It should be in one of the menus
cheers
I've set up the printer using KDE's Print Manager and CUPS, that is all the same. The problem has to do with ownership of /dev/lp0. I've looked into the groups and users belonging to that group, but can't narrow it down.

/dev/lp0 is owned by root, group is "lp0". Users in Group "lp0" include hplip (huh?), lp, myself, and root.

Is there another user (or some service) that has to be a member of the group lp0? None of the other users that are NOT members appear to have anything to do with printing, I was looking to see if "cups" was a user.

I normally work from the GUI, but am familiar enough with the command line I can perform tasks and report findings if needed.
 
Old 10-03-2009, 07:11 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I'm still running MEPIS 7, so my set up is little different from yours: /dev/lp0's group is "lp", not "lp0"; & its only member is myself.

I suggest you simply add all your printer authorized users to your "lp0" group.

One thing you don't mention is how these other users access the printer?
- Is it over the network?
- Do they have both Unix & Samba accts.?
- Is Samba configured correctly?
 
Old 10-03-2009, 01:27 PM   #5
robjacox
LQ Newbie
 
Registered: Jan 2005
Location: Bend, OR
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by archtoad6 View Post
I'm still running MEPIS 7, so my set up is little different from yours: /dev/lp0's group is "lp", not "lp0"; & its only member is myself.

I suggest you simply add all your printer authorized users to your "lp0" group.

One thing you don't mention is how these other users access the printer?
- Is it over the network?
- Do they have both Unix & Samba accts.?
- Is Samba configured correctly?
I stand corrected, group is "lp", not "lp0".

Here's the dir listing for /dev/lp0 right after boot:

root@linux:/dev# ls lp0 -l
crw-rw---- 1 root lp 6, 0 2009-10-02 10:28 lp0

On boot, members of group "lp" are:

robjacox (myself, the only one that logs on to the computer)
root
lp
hplip (not sure what this is)

Even at the above state, I cannot print myself (logged in as robjacox).
Once I give "others" access to /dev/lp0, I can print locally, and others (from Vista and XP computers using SAMBA) can print.

I will double check my SAMBA configuration, and see if root can print without changing any settings.

I've had all this working with MEPIS 6.0 and 6.5, problems started when I switched to MEPIS 8!
 
Old 10-03-2009, 03:05 PM   #6
robjacox
LQ Newbie
 
Registered: Jan 2005
Location: Bend, OR
Posts: 7

Original Poster
Rep: Reputation: 0
root can't print without changing /dev/lp0's permissions, either.

Can't see anything in SAMBA that would effect printing locally.

Will try and boot from a live MEMPIS 6 CD and see if I can find any differences.

Wonder why I can't change /dev/lp0's permissions and have it "stick" on re-boot? That would be the easy band-aid.
 
Old 10-03-2009, 06:01 PM   #7
robjacox
LQ Newbie
 
Registered: Jan 2005
Location: Bend, OR
Posts: 7

Original Poster
Rep: Reputation: 0
I loaded Mepis 6 live CD and installed my printer with CUPS. Mepis 6 has a user "cupsys" that is a member of group "lp", but there is no "cupsys" user in Mepis 8.
 
Old 11-01-2009, 08:31 AM   #8
lostweekend
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: Mepis, sidux
Posts: 1

Rep: Reputation: 0
Hi, I had this problem about 18 months ago (see mepislovers.org/forums/showthread.php?t=14723) and managed to identify the cups problem. I thought I'd post my solution in case you are still suffering.

I suspect that if you look in /etc/cups/cupsd.conf (or access the Print System configuration GUI, look in the filter section) you will find the entries:

User lp
Group lpadmin

In essence these control the ID and group that cups runs under - and hence you had the permissions problem as they don't match the permissions on /dev/lp0. Just changing the group to lp so it matches the out-of-the-box udev rule should resolve the problem (well it did for me).

In my case the printer was used only once every few months, and what bugged me was that it had been working OK and then for some unknown reason developed the permission problem. Playing around with some Virtualbox Mepis installs I think I came across the answer... As installed, the cupsd.conf file does not contain entries for User and Group - I assume therefore that cups uses the root user and so printing works as it matches the permissions on /dev/lp0. However, the first time you go into the configure print server option in the Print System, the GUI replaces the cupsd.conf file with a much more verbose version which includes the entries
User lp
Group lpadmin
and hence printing stops working!!

Mark
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C functions to access parallel port. nethunter Linux - Networking 4 03-22-2006 02:56 AM
Parallel Port Access BorgKiller Programming 1 12-22-2005 05:46 PM
Allow program to access parallel port LongName Linux - Newbie 5 08-27-2004 07:08 PM
Parallel Port issues (not printer) MightyCranium Linux - Newbie 3 12-08-2003 08:55 PM
Parallel port pin access Robert0380 Linux - Hardware 5 07-29-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration