LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 12:13 PM   #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, 08: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, 11: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, 01: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, 05: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


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


All times are GMT -5. The time now is 12:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration