LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-02-2003, 06:57 PM   #1
kkempter
Member
 
Registered: Dec 2002
Posts: 187

Rep: Reputation: 30
Angry Help ! Printing with Samba in RedHat 9


I have samba up and running on my Red Hat 9.0 box. and I have a cups printer attached to the same Red Hat box and I can print from this machine in star office, or whatever with no problems.

I also have a windows 2000 box and I've installed the netbeui protocol. If I go to "my Network Places" on the desktop and then to "computers near me" I see the Red Hat server (named Isaiah). If I double click on Isaiah I can see my home directory (which I can browse) and the locally connected printer. (Actually I also see a remotely connected printer on yet another Red Hat 9 box, but I am not concerned with this printer for now).

Anyhow, I've setup a new printer in windows 9 i had to boot up with the printer locally connected to the windows box before it would load the drivers locally (another windows fiasco). So , now I have the windows printer as \\Isaiah\OfficeJet_V40 but I cannot print to the printer. Windows sends the jobs off to /dev/null land somewhere and I never see them Que'd on the Red Hat Box. I've listed my smb.conf file without the commented out lines below: Can anyone help me please??????


#======================= Global Settings ===
[global]
workgroup = WORKGROUP
server string = Samba Server
hosts allow = 192.168.1. 192.168.2. 127.
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 0
security = user
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no

#============================ Share Definitions =====
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775


[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = yes
printable = yes

# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
path = /tmp
read only = no
public = yes
 
Old 06-02-2003, 08:12 PM   #2
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
I see that you have set up user-level security. My Samba is set up for share-level security; I haven't been able to get user-level security to work yet (this seems to be a Windows vs Linux thing). You could give share-level security a go and see if that works any better.

You also have 'printcap name = /etc/printcap'. My config file has this as 'printcap name = cups', although this difference may be because I am running Mandrake.
 
Old 06-02-2003, 08:29 PM   #3
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
I just noticed something else - my smb.conf file has a section like this:
-------------------------------------------------------------------------------
# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to swap the 'print command' line below with the commented one.
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no

# to allow user 'guest account' to print.
public = yes
writable = no
printable = yes
create mode = 0700

# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
available = yes
; print command = lpr-cups -P %p %s -r # using cups own drivers (use generic PostScript on clients).
-----------------------------------------------------------------------------------

Yours seems to be missing the 'print command =' bit.

Also, when installing drivers on your Windows machine, couldn't you select the network option, then when prompted for the driver location, use the 'have disk' button? Have you removed the 'local' printer, just in case Windows is 'confused' (we know how Windows gets confused with Linux).
 
Old 06-03-2003, 03:52 PM   #4
kkempter
Member
 
Registered: Dec 2002
Posts: 187

Original Poster
Rep: Reputation: 30
Close but not quite

Thanks.. that helped - now windows says "access denied, unable to connect"

any ideas? The printer is shared to "all hosts" from the Linux side
 
Old 06-03-2003, 10:40 PM   #5
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
Right, probably a password problem. My smb.conf file has different password settings; basically, it is all turned off. I'll post my entire smb.conf, minus comments, so you can compare:
---------------------------------------------------------------------------------------
[global]
# 1. Server Naming Options:
workgroup = MyNetwork
server string = Samba Server %v
# 2. Printing Options:
printcap name = cups
load printers = yes
printing = cups
printer admin = @adm
# 3. Logging Options:
log file = /var/log/samba/log.%m
max log size = 50
# 4. Security and Domain Membership Options:
map to guest = bad user
security = share
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
# 5. Browser Control and Networking Options:
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# 6. Domain Control Options:
# 7. Name Resolution Options:
dns proxy = no
unix password sync = no
password level = 0
null passwords = no
os level = 0
preferred master = no
domain master = no
wins support = no
dead time = 0
debug level = 0
status = yes
ldap ssl = yes
# 8. File Naming Options:
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
public = yes
writable = no
printable = yes
create mode = 0700

print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
available = yes

[print$]
path = /var/lib/samba/printers
browseable = yes
read only = yes
write list = @adm root
guest ok = yes

[pdf-generator]
path = /var/tmp
guest ok = No
printable = Yes
comment = PDF Generator (only valid users)

#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP doc_name &
print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

[MyData]
comment = MyData
writable = yes
public = yes
path = /mnt/win_e/Data/MyData

[Programs]
comment = Programs
writable = yes
public = yes
path = /mnt/win_d/Programs

# An extra printer definition designed to get around WinME's practice of truncating
# network share names to 13 characters, which results in 'Kyocera-FS101' being
# displayed on the Windows side but rejected when trying to use it.
[KyoceraFS1010]
comment = Kyocera FS-1010
; valid users = fred
path = /var/spool/samba
printer = KyoceraFS-1010
public = yes
writable = no
printable = yes
--------------------------------------------------------------------------------------

All the other entries appearing in yours have been commented out in mine. I also had to remove entries related to 'validusers = ', or else I got the same message. My Windows sytem is Win Me, which is similar to Win 2000 in places, but not quite in all.
 
Old 06-04-2003, 12:35 PM   #6
kkempter
Member
 
Registered: Dec 2002
Posts: 187

Original Poster
Rep: Reputation: 30
I still get the same message in widows in the "status" column of the printers window it says "Access denied, unable to connect"

Maybe I setup the printer from windows incorrectly? I did add new printer, network printer and then browsed to the printer on the Linux box. Is this correct?
 
Old 06-04-2003, 09:15 PM   #7
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
You seem to have used the correct method of installing the printer. That's the same method I used. When Windows went looking for the driver, I interrupted the process and used the 'Have disk' button in the Add Printer wizard, then navigated to the driver on my printer's driver CD.

I'd say that the printer installation is valid, just that Windows is not being granted access. I'm also guessing that this is because of a password problem between Win 2000 and Linux. All I can suggest is to check samba.org documentation for any clues:

http://www.samba.org

Also, Tom Angle (tangle on LQ) has an example samba conf file here:

http://www.valkyre.net/~tangle/web/c...s/smb_conf.htm

that you might find useful. Also, you might search this site; other people have had similar problems, and their solutions might be useful.

Sorry, but I've reached the limit of my knowledge on this.

<edit> samba & tangle urls.

Last edited by geoff_f; 06-04-2003 at 09:27 PM.
 
Old 06-04-2003, 09:30 PM   #8
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
Update: I just tried Tom Angle's site, and could not find it; it seems to have disappeared.
 
Old 08-04-2003, 09:55 PM   #9
DocKarl
LQ Newbie
 
Registered: Aug 2003
Posts: 14

Rep: Reputation: 0
OK, I am having simillar issues.

Try reading http://www.linuxchix.org/pipermail/t...ch/014934.html

try typing this from your windows box - echo Hello^L \\servername\printquename

does a page print out on your linux printer?

Also try on your linux box:-

iptables -F
service smb restart
service cups restart

now try the echo command again from the dos prompt on your windows computer.

Doc
 
Old 08-04-2003, 10:49 PM   #10
DocKarl
LQ Newbie
 
Registered: Aug 2003
Posts: 14

Rep: Reputation: 0
Righto - this worked for me - and very hard to find relevant info on web.

The solution is (drum roll), in your /etc/samba/smb.conf change to reflect the following:-

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = yes
writable = yes
printable = yes
use client driver = yes

the last line is the clincher. This will stop the annoying message, as it will tell Linux to use windows drivers for the printer.

All the best,

Doc
 
  


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
Samba and Printing anickless Linux - Networking 7 12-16-2005 12:10 PM
printing through samba doralsoral Linux - Software 4 08-13-2004 12:38 AM
samba not printing tddlard Linux - Software 5 12-29-2003 09:42 PM
Samba printing leonardox Linux - Networking 1 08-31-2003 12:49 AM
Redhat 8 Samba Printing bax Linux - Software 7 03-22-2003 02:34 PM


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