Link to home
Start Free TrialLog in
Avatar of waygood
waygood

asked on

basic samba setup (part 2) printers

Hello again,

I have setup some shared directories with everyones help last time. Now I want to setup a shared printer.
I can see the printer when browsing on my Windows2000 machine to the linux suse9.0 box, and can add it as a network printer, but when I highlight it from the list of printers I get: "Access denied, unable to connect". It will not print either.
Unider Linux the printer has been installed, and prints a test page without any problems. Do Locla filtering is ON, as suggested (servers that do not do any filtering such as SMB and IPX).


heres what the configuration is at present:-

---------------- /etc/samba/smb.conf ------------------------------------------
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SuSE
# Date: 2004-01-09
[global]
   workgroup = ARMOUR
   netbios name = LINUX
   interfaces = 192.168.0.0/24
   encrypt passwords = Yes
   security = user
   log level = 0
   log file = /var/log/samba/log.%m
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = NO
   preserve case = Yes
   short preserve case = No
   printing = yes
   printcap name = /etc/printcap
   load printers = yes
   lock directory = /var/lock/samba
[printers]
   comment = All printers
   path = /var/spool/lpd/lp
   browsable = yes
   printable = yes
   writeable = yes
   create mode = 0700
[brother1230]
   path = /var/spool/lpd/lp
   printer name = brother1230
   writeable = yes
   public = yes
   printable = yes
   print command = lpr -r -h -P %p %s
[AdminBackup]
   comment = backup shares
   path = /export/samba/backup
   writeable = yes
   public = no
   browsable = no
   write list = @staff
[Backup]
   comment = All backup shares
   path = /export/samba/backup
   writeable = yes
   public = yes
   browsable = no
   printable = no
   write list = @staff
   create mode = 0777
   directory mode = 0777
   force group = smbstaff
[Company]
   comment = Company share
   path = /export/samba/company
   public = yes
   writable = yes
   printable = no
   write list = @staff
   create mode = 0755
   directory mode = 0755
   force group = smbstaff
[Software]
   comment = Shared software
   path = /export/samba/software
   public = yes
   writeable = yes
   printable = no
   write list = @staff
   create mode = 0755
   force group = smbstaff
   directory mode = 0755

---------------  /etc/cups/printers.conf --------------------------------------------
# Printer configuration file for CUPS v1.1.19
# Written by cupsd on Wed 28 Apr 2004 09:49:36 BST
<DefaultPrinter brother1230>
Info Brother HL-1230 series
Location Parallel printer on /dev/lp0
DeviceURI parallel:/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

------------------ /etc/printcap -----------------------------
# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file.  All changes to this file
# will be lost.
brother1230|brother1230:rm=linux:rp=brother1230:


I have a network of Windows2000 pc's and a single linux box with suse 9.0 installed. There is no other machines (Windows NT/Server).
Avatar of owensleftfoot
owensleftfoot

I dont think you need to define every printer when you have [printers] defined. Also I think the spool directory should be /var/spool/samba.
Try commenting out the brother definition and changing the [printer] define to
[printers]
   comment = All printers
   path = /var/spool/samba
   browsable = yes
   printable = yes
   writeable = yes
   create mode = 0700
Avatar of waygood

ASKER

Yes, your right the printer does still show up when browsing.

BUT it still will not print
What are the permissions on the /var/spool/samba directory?
ls -l /var/spool will show you.
Avatar of waygood

ASKER

there is no /var/spool/samba directory

only  

drwxr-xr-x   13 root     root          344 2004-04-15 01:15 .
drwxr-xr-x   15 root     root          384 2004-04-15 01:19 ..
drwx------    2 at       at             72 2004-04-14 19:48 atjobs
drwx------    2 at       at             48 2003-12-10 12:43 atspool
drwxrwx---    2 mail     mail           48 2003-12-10 17:14 clientmqueue
drwx------    4 root     root          120 2004-04-14 21:31 cron
drwx--x---    3 lp       lp            120 2004-04-28 10:57 cups
lrwxrwxrwx    1 root     root            7 2004-04-14 19:36 locks -> ../lock
drwxr-xr-x    2 lp       lp             48 2003-12-10 17:14 lpd
drwxrwxrwt    2 root     root           72 2004-04-15 01:49 mail
drwxrwxr-x    9 news     news          216 2004-01-09 18:19 news
drwxr-xr-x   14 root     root          336 2004-04-14 19:51 postfix
drwxr-xr-x    3 uucp     uucp           72 2004-04-14 19:36 uucp
drwxr-x---    9 wwwrun   root          224 2004-04-15 01:15 wwwoffle
Avatar of waygood

ASKER

I used SWAT to add a printer, and the configuration changed to:-

[brother1230]
  path = /tmp
  guest ok = yes
  printable = yes

There is no [printers] and I removed all other printer references, such as "load printer" and "printcap name", and it prints ok.
BUT it still gives the access error as mentioned before.
ASKER CERTIFIED SOLUTION
Avatar of owensleftfoot
owensleftfoot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of waygood

ASKER

cracking, worked like a dream