Improve company productivity with a Business Account.Sign Up

x
?
Solved

basic samba setup (part 2) printers

Posted on 2004-04-28
7
Medium Priority
?
954 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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

595 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