LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2003, 11:13 AM   #1
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Rep: Reputation: 15
Can print as root but not normal user


Hi all,

I'm using Redhat 7.1 and have a Epson Stylus Color 850. I can print to the printer as root but not as a normal user. I created the normal user simply by

useradd username

I "su username" and tried to print by

lpr textfile

but it said

Warning - Cannot open file 'textfile', Permission denied
Epson: nothing to print

I tried to change the setting in the /etc/lpd.perms file and did a "service lpd restart" but nothing changed. I know that it must be due to some difference between root and a normal user. Would someone give me a pointer? Thanks a lot!
 
Old 07-17-2003, 07:50 PM   #2
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Rep: Reputation: 30
hi paranoia.
What are the permissions of the text file?
 
Old 07-18-2003, 10:07 AM   #3
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Hi BigBadPenguin

I found that the problem is related to the permission of the directory /var/spool and its subdirectories. I played w/ the permissions using "chmod" and somehow I messed up the system. Now I've reinstalled Linux again.

For the following directories

/var
/var/spool
/var/spool/lpd
/var/spool/lpd/printername

What should their permissions be so that a normal user created by "useradd username" is allowed to user the printer? Thanks a lot!
 
Old 07-18-2003, 12:10 PM   #4
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Rep: Reputation: 30
The permissions should be -rwx-r-xr-x (755). That's how it is on my box with no problems. Still, if you reinstalled, it should already be that way.
 
Old 07-18-2003, 04:07 PM   #5
paranoia1980
Member
 
Registered: Jun 2003
Location: LA
Distribution: RedHat Linux 7.1
Posts: 34

Original Poster
Rep: Reputation: 15
Solved the problem

I managed to solve my problem. Actually, I can print not only on my Linux server, but also print from a Windows 2k machine to the Linux printer. The followings were what I found out:

1. In the smb.conf file, I found that the name of the printer share must match the name of the printer on the Linux machine. For example, with the directory /var/spool/lpd/epson, then I've to use

[epson]
....

as my printer share name

2. I set the path of the printer share to /tmp, that is,

path = /tmp

and it worked. I used to set the path as

path = /var/spool/lpd/printername

but it didn't work. I checked their permssions and found that for /tmp its permission is drwxrwxrwt, and for /var/spool/lpd/printername it's drwx------.

Does somebody know why I have to set the path to /tmp instead of /var/spool/lpd/printername to make it work?
 
  


Reply



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
Can't su into root as normal user darin3200 Linux - General 13 03-18-2010 11:03 AM
cannot print as normal user in kde without authorization thegeekster Debian 4 03-30-2005 07:31 PM
Root? normal user? what does it all mean? Zieroth Linux - Newbie 5 07-16-2004 04:06 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
normal user can not delete his own print jobs nIMBVS Linux - Hardware 1 10-23-2003 11:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:17 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