Click to See Complete Forum and Search --> : network printing


justborntux
08-01-2002, 11:07 PM
i recently posetd this in the wrong section...oops.

I am very new to linux....ne way, I've already setup a file server and i also want this box to be my print server. I have a Lexmark Optra R+ laser and it prints from my linux box fine (i set it up using cups), but im dumbfounded trying to get it print using samba. The other machines are a windoz boxen win2k and 98 (plz dont tel me to upgrade os to xp cuz i hate the bloated os). I have the drivers on both machines for the printer but i cant seem to get the cue right. here is my smb.conf sample

[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
map to guest = bad user

[data]
comment = Comment
path = /home/data
read only = no
public = yes

# printer stuff 7-28-02
[global]
printing = cups
printcap name = /etc/printcap
print command = lp -d %p -o raw %s rm -f %s
load printers = yes
log file = /var/log/samba-log.%m
lock directory = /var/lock/samba

[printers]
comment = All Printers
security = server
path = /var/spool/cups/c00001
browseable = no
printable = yes
public = yes
writable = no
create mode = 0700

[Lexmark]
security = server
path = /var/spool/cups/c00001
printer name = Lexmark
writable = yes
public = yes
printable = yes
print command = lpr -d %p -o raw %s rm -f %s


any help will be applied and tried and learned. btw its redhat 7.3. plz help quick life or death situation fiance will kill me if i dont get it working soon--she is having printer withdrawals. its been down for a week because i wanted a linux fs and ps.


update:

ok, i can see my printer in the network from both w98 and 2k boxen, but still cant get it to print, the 2k box gives an error "Access denied...". I checked and made sure each user can print directly from the linux box when logged in directly.

in 2k server this is much easier...hehe, but linux is soooo much faster as a fs.

cowanrl
08-02-2002, 06:55 AM
From what I have found with printing in Samba, you're best to keep it as simple as possible.

The only 3 lines I would leave in your global section that relate to printing are:

printing = cups
load printers = yes
printcap name = /etc/printcap

I'm not familiar with cups so I don't know if it actually uses the /etc/printcap file.
Are you absolutely sure you need that print command line? Did you read it your printer manual somewhere? If you're not absolutely sure you need it, remove it.
The log file and lock directory parameters don't pertain to printing so I won't comment on them.

As far as your printer shares go, I'd stick with the default one for Samba that shares out all printers. I've never used anything but this and it always shares out all of my printers.

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

You can change the path to /var/spool/cups/c00001 if that's where cups needs to spools the print jobs.
The security = server has no place in a share definition. You shouldn't need the create mode = 0700 either.
If you want to be able to browse your printers in Windows, set browseable = yes.


Remark out the lexmark share and restart Samba. It should share out all of your printers. Once you get it working, you can then tweak the settings for the Lexmark printer if you want.

Of course, this all depends on the rest of Samba working OK. Are you able to see and access all of your file shares without problems?