Solved

basic samba setup (part 2) printers

Posted on 2004-04-28
7
942 Views
Last Modified: 2010-08-05
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).
0
Comment
Question by:waygood
  • 4
  • 3
7 Comments
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10937777
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
0
 
LVL 9

Author Comment

by:waygood
ID: 10937876
Yes, your right the printer does still show up when browsing.

BUT it still will not print
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10938507
What are the permissions on the /var/spool/samba directory?
ls -l /var/spool will show you.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 9

Author Comment

by:waygood
ID: 10938959
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
0
 
LVL 9

Author Comment

by:waygood
ID: 10939260
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.
0
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 125 total points
ID: 10939332
Have a look at http://www.samba.org/samba/docs/man/CUPS-printing.html
I suspect you will have to create /var/spool/samba
0
 
LVL 9

Author Comment

by:waygood
ID: 10939852
cracking, worked like a dream
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question