Click to See Complete Forum and Search --> : Samba Printer Sharing Help Needed


Legolas45
03-12-2003, 04:54 PM
I'm new to Samba, and am having trouble getting it to share a printer. I have been successful in configuring it to provide access to /home/* directories for Windows users, but can't get it to share a printer.

The printer is an HP PSC 500, is attached to the linux box, and I can print a test page from YaST2.

Here is my /etc/smb.conf

# Samba config file created using SWAT
# from linux.local (192.168.0.1)
# Date: 2003/03/12 13:02:39

# Global parameters
[global]
workgroup = ELNET
server string = Samba Server
encrypt passwords = Yes
log file = /var/log/samba/%m.log
time server = Yes
unix extensions = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
printcap name = CUPS
character set = ISO8859-15
os level = 65
lock dir = /var/lock/samba
hosts allow = 192.168. 127.
printing = cups
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0640
directory mask = 0750
browseable = No

[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
guest ok = Yes
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[color]
comment = HEWLETT-PACKARD PSC 500
path = /var/tmp
read only = No
create mask = 0600
guest ok = Yes
hosts allow = 192.168.0.2 127.0.0.0
printable = Yes
printer name = color
oplocks = No


In Windows, I have set the port in the printer properties to "\\linux\color". Any ideas?

Thanks!

cowanrl
03-12-2003, 05:20 PM
Well, you didn't say what kind of problems or errors you got in Windows or what Windows versions you are printing from.
When you print from windows, do you get a bunch of garbage printing out or do the print jobs just seem to go nowhere with no error messages?

Everything looks OK in your smb.conf file. One question about it, is the actual name of the printer in Linux actually "color"? If not, you would need to change the "printer name =" line to match what the name of the printer actually is.

st0rmrd
03-12-2003, 05:55 PM
I hope the \\linux\color port is the "network neighborhood" address of your printer, meaning that in the machine named linux you can browse to a printer named color...

well, I had a similar problem which I solved thus:
my windows98 was configured with the driver for windows for my printer. the driver did all the preparing for the page to be printed so all that had to happen is t transfer the whole thing to the printer without any more preparing (say the driver installed in the linux machine). So, I looked in the manual of the lpr command (man lpr) and found out the argument -l does the job I needed, to send the document without any preparation.

Meaning: change your configuration to include the printing command lpr -l instead of lpr

check your documentation before doing this, I don't have it in front of my to check it, if you don't manage to fix it I'll return with more details.

Legolas45
03-14-2003, 10:32 AM
Thanks both of you for your help!

I inserted the "-l" directive into the lpr command and it worked :D .