LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-20-2003, 03:38 PM   #1
katarn444
LQ Newbie
 
Registered: May 2003
Posts: 2

Rep: Reputation: 0
Print sharing with samba


I have been searching for this problem for several days now and still do not have it working.
I have redhat 9.0
The printer works fine from within linux.
File sharing works fine and I can see the printer from within windows (2000 and xp)

When I try to print in windows I don't get any kind of error the printer just sits there. I know that the file is actually being transfered because I have watched the printer path directory and can see the file being tranfered. So the only thing that can be wrong is something in the smb.conf file, correct?

If anyone has any ideas I would appreciate it.
I will include my smb.conf
I have screwed with every setting I know of and get nothing
Thanks
Katarn


# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = apartment

# server string is the equivalent of the NT Description field
server string = samba server

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = [bsd|sysv|plp|lprng|aix|hpux|qnx|cups]

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
max log size = 0

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd


# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
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*

# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.

pam password change = yes

# This parameter will control whether or not Samba should obey PAM's
# account and session management directives. The default behavior is
# to use PAM for clear text authentication only and to ignore any
# account or session management. Note that Samba always ignores PAM
# for authentication in the case of encrypt passwords = yes

obey pam restrictions = yes

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
local master = yes

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
domain logons = yes



# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
username map = /etc/samba/smbusers
dns proxy = no


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

[deskjet670c]
valid users = root administrator
printable = yes
writable = yes
public = yes
printer = deskjet670c
path = /storage
guest ok = yes
print ok = yes

[storage]
comment = maxtor 80 gig storage drive
path = /storage
writeable = yes
valid users = root
public = no
printable = no
guest ok = no
 
Old 05-21-2003, 09:43 AM   #2
luciji
LQ Newbie
 
Registered: May 2003
Posts: 5

Rep: Reputation: 0
I had all kinds of problems setting up printing using the standard tools that came with RH. I guess they should have worked, but after beating my head against a brick wall for long enough, I installed LPRngtool. I used it to set all my printers up. In the smb.conf file, all you need is a few entries to get things rolling.

In the [Global] section, printing = lprng

In the [Printers] section, I have the following;
path = /var/spool/lpd/samba
guest ok = yes
printable = yes
print command = lpr -P%p -r %s
lpq command = lpq -P%p
lppause commmand = lpc hold %p %j
lpresume command = lpc release %p %j
queuepause command = lpc stop %p
queueresume command = lpc start %p
browseable = no

And thats it. And most of that is written for you when you install lprng. In our network we have mostly jetdirect/socketed printers, although we have one or two direct lpt:1 printers. It handles them all. A few words on some of the shortcomings I've noticed, though.

The included driver files/filter files are mostly laser type. There is hardly mention of dot matrix printer support. I've found one driver/filter that I use for all of our dot matrix/line printers, and it works well. It is the necp2x.upp filter (NEC 2PX). This seems to work well for me.

Another issue is the problem of lf/cr not being interpreted correctly. This is a windows/dos/linux issue. They do include a filter to correctly add a carriage return to all line feeds (lpf), and this fixes that. So, for all the printers that needed it, I first send them a spool that filters for line feeds/cr, then I send them to the spool that applies the normal driver filtering/formatting. No big deal.

It does come with a handy gui for your x-windows, and plenty of instructions on how to get things rolling. I found it very easy to use.

Good luck!
 
Old 05-21-2003, 10:40 AM   #3
katarn444
LQ Newbie
 
Registered: May 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the advice, I will try it out.
So that would be a substitution for cups, which I think I'm using?

I will also include that I am using an HP Deskjet670c if that matters, which it could for driver availibility.

Thanks again
Katarn
 
  


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/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
Samba linux print sharing ? heinola Linux - Networking 4 02-21-2005 06:25 AM
usb+epsonc80+Samba print sharing problem jr87 Linux - Hardware 1 01-23-2004 04:19 PM
slack and samba print sharing? doublefailure Linux From Scratch 1 06-08-2003 11:10 AM
slack and samba print sharing? doublefailure Slackware 2 04-07-2003 07:34 PM


All times are GMT -5. The time now is 09:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration