Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO CUPS+Samba: printing from Windows & Linux
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 9, 10, 11  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
olli.bo
Apprentice
Apprentice


Joined: 16 Jul 2003
Posts: 208
Location: Germany

PostPosted: Thu Aug 12, 2004 2:16 pm    Post subject: Reply with quote

daff wrote:
Hm. You have a section for your printer in your smb.conf? A [toshtest] if I am not mistaken?


I tried with [toshtest] and without... same result...

Quote:
What I find interesting is that your CUPS driver files lack the "suffix" `5', i.e. they are named cups.dll, cupsdrvr.dll, ... and not cups5.dll, cupsdrvr5.dll, etc. Did you use the correct CUPS drivers from the CUPS web site (to be downloaded here)?


I'm using the old cups-drivers because we ware using cups 1.1.19

Quote:
If not then get them, delete the contents of /var/lib/samba/printers, install them via the cups-install.sh script, make sure the directory /var/lib/samba/printers you specified is readable by all and writeable by root and any printer admin user and run cupsaddsmb again. I updated the guide so it shows a correct sample-output of the command.


Code:
# find /var/lib/samba/printers/
/var/lib/samba/printers/
/var/lib/samba/printers/W32X86
/var/lib/samba/printers/WIN40
# rm -rf /var/lib/samba/printers/*
# cupsaddsmb -H localhost -U printadm -h localhost -v -a
Password for printadm required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'printadm%XXXXXXXX' -c 'mkdir W32X86;put /var/spool/cups/tmp/411b7ab875f1c W32X86/toshtest.ppd;put /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp'
Domain=[OLB] OS=[Unix] Server=[Samba 3.0.4]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /var/spool/cups/tmp/411b7ab875f1c as \W32X86/toshtest.ppd (9916.5 kb/s) (average 9916.6 kb/s)
putting file /usr/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll (19418.1 kb/s) (average 15963.1 kb/s)
putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll (17565.6 kb/s) (average 16528.8 kb/s)
putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp (1069.3 kb/s) (average 12252.7 kb/s)

Running command: rpcclient localhost -N -U'printadm%XXXXXXXX' -c 'adddriver "Windows NT x86" "toshtest:cupsdrvr.dll:toshtest.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL"'
Printer Driver toshtest successfully installed.

Running command: rpcclient localhost -N -U'printadm%XXXXXXXX' -c 'setdriver toshtest toshtest'
Succesfully set toshtest to driver toshtest.
#


Same result with two different Windows NT 4 Workstations: "The driver could not be installed".

Quote:
What kind of printer to you have? Is it not locally connected (I am referring to the entry DeviceURI socket://184.1.52.26:9100 in printers.conf)?


It is a big Toshiba e-Studio3511 network printer

Quote:
That's the ideas I have for now, hope it helps!


Thank you. :D
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Thu Aug 12, 2004 2:26 pm    Post subject: Reply with quote

Ok, haven't thought that you could be using the older CUPS version, my bad :)

I am not sure, but what's the point to use a CUPS printserver if you have a network printer? I guess the idea is automagic download of the printer drivers, but I somehow doubt that this would work. A printer server to provide drivers to clients for another printer server (a network printer is its own printer server if I am not mistaken, not sure about your model)? Sounds a bit weird and a bit too complex for Windows networking, but I've never tried anything like that, so I could be talkin trash here :)

That's maybe why it makes no difference to have or not have a [toshtest] section as described.

Using CUPS on the client to print to the network printer works of course, that's one of the ideas behind CUPS (we have an Okipage network printer here which works just fine when I use the correct ppd on my Gentoo laptop).

Does the network printer work when you install the correct Windows drivers locally on the clients? What if you connected your printer locally to the CUPS server, add the [toshtest] section and then try connecting to it from the clients?
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
olli.bo
Apprentice
Apprentice


Joined: 16 Jul 2003
Posts: 208
Location: Germany

PostPosted: Thu Aug 12, 2004 2:41 pm    Post subject: Reply with quote

daff wrote:

I am not sure, but what's the point to use a CUPS printserver if you have a network printer? I guess the idea is automagic download of the printer drivers, but I somehow doubt that this would work. A printer server to provide drivers to clients for another printer server (a network printer is its own printer server if I am not mistaken, not sure about your model)? Sounds a bit weird and a bit too complex for Windows networking, but I've never tried anything like that, so I could be talkin trash here :)


As I understood cups has its own drivers for the Toshiba network printer. So it is the same like a usb or parallel connection only over a network...
We need this easy connection with automatic driver installations, because this here is a very big network with hundrets of users without idea about anythink with computers.

Quote:
Does the network printer work when you install the correct Windows drivers locally on the clients?


I tried to install the Adobe drivers locally on the NT Workstations. This works...

Quote:

What if you connected your printer locally to the CUPS server, add the [toshtest] section and then try connecting to it from the clients?


I can't connect the printer direct with the CUPS server... The printer only has network interfaces

Tanks for your help
olli
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Thu Aug 12, 2004 2:46 pm    Post subject: Reply with quote

Hm, that's a situation I've never come across so I can only guess :)

You mean CUPS sees the printer just like it was a local printer? Then of course it should be theoretically possible to serve it just like a local printer. Which driver did you use for that Toshiba printer to make it look like a local one?
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
olli.bo
Apprentice
Apprentice


Joined: 16 Jul 2003
Posts: 208
Location: Germany

PostPosted: Thu Aug 12, 2004 3:07 pm    Post subject: Reply with quote

daff wrote:
You mean CUPS sees the printer just like it was a local printer? Then of course it should be theoretically possible to serve it just like a local printer. Which driver did you use for that Toshiba printer to make it look like a local one?


I installed the printer how it is described in your howto:
lpadmin -p toshtest -E -v socket://184.1.52.26:9100 -m toshibas_ppd_file-ppd

I don't think that this is a problem with the printer itself.
Back to top
View user's profile Send private message
mold
n00b
n00b


Joined: 31 Jul 2004
Posts: 52
Location: Essen, Germany

PostPosted: Thu Aug 12, 2004 3:15 pm    Post subject: Reply with quote

I finally got it to work, thanks Daff.
I had to run the Adobe installer and copy the files over from a Windows temporary directory *before finishing the installer.*
As far as I can tell, if you let the installer run through completely, you will not find the files on a W2k machine. That is because the files the installer program actually installs are not the ones mentioned in the cupsaddsmb manpage. It only extracts them temporaily, but then it installs something like 'PSblahblah.DLL' in stead. Doh!
I pray to God that my setup will work work stable now - I am so fed up with those damn Windows clients...

About olli.bo's problem: It definately works with network printers. I have such a setup running now, where CUPS connects to a small printserver box via LPD.

olli, I think it might be a problem with your permissions. Maybe try to change this line in your smb.conf:
Code:

[print$]
guest ok = yes


Here is my smb.conf that now works for me with W2K and WinXP clients:
Code:

[global]
   workgroup = MYLAN
   server string = %h server (Samba %v)
   security = SHARE #must temporarily set this to user to run cupsaddsmb
   obey pam restrictions = Yes
   passdb backend = tdbsam, guest
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   wins proxy = Yes
   ldap ssl = no
   panic action = /usr/share/samba/panic-action %d
   csc policy = disable

[printers]
   comment = All Printers
   path = /var/spool/samba
   printer admin = root
   create mask = 0700
   guest ok = Yes
   printable = Yes
   browseable = No

[print$]
   comment = Printer Drivers
   path = /etc/samba/drivers
   write list = root
   guest ok = Yes

#file shares follow
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Thu Aug 12, 2004 6:10 pm    Post subject: Reply with quote

mold: Great to hear you got it working! I think I'll put a section about the Adobe drivers in the guide if you don't mind! Sorry I couldn't help that much though.

About the other problem: as I said I have no real experience with such a setup but it sounds very promising that you got it working!

I've tried and tried with one of those LinkSys EPSX3 print servers with an attached Kyocera Mita FS1010 but it just would not interpret any postscript input. Meaning it prints out the postscript source in plain text, i.e. the CUPS test page is several pages long, filled with postscript commands in plain text. Same thing with every other file I try to print, even real plain text.

I tried with the original .ppd from Kyocera, as well as several from linuxprinting.org but always with the same result.

What printer do you use? Do you remember how you installed the printer so it would work with CUPS? Maybe you could PM me the instructions when you have the time or even put a little mini-howto together ;)

Such a setup would be very nice here too, I am sick of manually installing printer drivers on 40 machines every few months.

olli.bo: mold could be right with the guest ok = yes setting although I am not sure that this is necessary. You could examine the Samba log files and see what happens at the moment you try to connect to a printer.

Granted, the Samba logs are really full of stuff but if you take a thorough look you might find a permission problem or any other error message that could indicate the problem.

Theoretically it should work...
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
mold
n00b
n00b


Joined: 31 Jul 2004
Posts: 52
Location: Essen, Germany

PostPosted: Thu Aug 12, 2004 7:27 pm    Post subject: Reply with quote

In my case, a HP LaserJet 6MP is connected to a pretty old printserver box. This printserver understands Appletalk and LPD, but neither IPP nor SMB (which is part of the reason why I use a Gentoo server between the printserver and the Windows clients - as far as I can tell, current versions of Win do not support LPD).
Basically, I installed the LaserJet 6MP with Foomatic exactly like I would install a locally connected printer (followed the Gentoo printing HOWTO), the only difference was that as device, I did not use something like 'file:/dev/lp0', but:
Code:

lpd://192.168.0.3/printer


Where 192.168.0.3 is my printserver's IP and 'printer' is the name of the print queue on the printserver (configured that by telnetting the printserver). From there on, I just used cupsaddsmb the usual way.

The exact same approach works for me with an Apple network printer, which basically is a printer with an integrated LPD printserver.

I only have experience with 2 network printers/print servers, so I cannot say if the same will work for anyone else.
Back to top
View user's profile Send private message
sepulchron
n00b
n00b


Joined: 13 Aug 2004
Posts: 8

PostPosted: Fri Aug 13, 2004 8:31 pm    Post subject: Reply with quote

do you remember the "NT_STATUS_BAD_NETWORK_NAME - problem"?
some posts before a few people had this but as far as i could see, the prob wasn't solved...
if it is solved please tell me how :-)
because i am facing this problem now...

at least i found out some additional information which could help to solve the problem. First i'd like to repeat the problem:

alright, it is about the "cupsaddsmb"
i always get this:
Code:

Yggdrasil root # cupsaddsmb -H Yggdrasil -h Yggdrasil -U root -v -a                 Password for root required to access Yggdrasil via SAMBA:
Running command: smbclient //Yggdrasil/print\$ -N -U'root%********' -c 'mkdir W32X86;put /var/spool/cups/tmp/411d1e700b92e W32X86/Epson.ppd;put /usr/share/cups/drivers/cupsdrv5.dll W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp W32X86/cups5.hlp'
Domain=[YGGDRASIL] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME


smbclient is working fine on all shared stuff.
EXCEPT on this [print$] share in which the drivers shall be copied.
watch this:
Code:

Yggdrasil root # smbclient //Yggdrasil/print\$ -U root
Password:
Domain=[YGGDRASIL] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME


testparm says that everything is fine...here its output:
Code:

[global]
workgroup = Niflheimr
server string = Yggdrasil
netbios name = Yggdrasil
encrypt passwords = True
security = user
smb passwd file = /etc/samba/private/smbpasswd
log file = /var/log/samba/log.%m
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
bind interfaces only = True
interfaces = lo eth0
hosts deny = 0.0.0.0/0
hosts allow = 192.168.8.20 192.168.8.18 192.168.8.17 127.0.0.1
printcap name = cups
load printers = yes
printing = yes

[print$]
comment = Printer Drivers
path = /etc/samba/printer       # path to the driver structure
guest ok = no
browsable = yes
read only = yes
write list = root,flo

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writeable = no
printable = yes
printer admin = root

[public]
comment = Public Files
browsable = yes
public = yes
writeable = yes
create mode = 0766
guest ok = no
path = /home/samba/public


hope we can solve this problem, since many seem to face it...
Back to top
View user's profile Send private message
olli.bo
Apprentice
Apprentice


Joined: 16 Jul 2003
Posts: 208
Location: Germany

PostPosted: Thu Aug 19, 2004 3:06 pm    Post subject: Reply with quote

I solved my WinNT-connect problem. The reason was that my printer-admin-user had not enough rights to serve the printer or what ever...

My new problem is that the adobe-driver or the cups-server seems not to serve the special features like sorting paper and so on.
Is it possible to use the original printer drivers instead of the cups or adobe drivers?
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Thu Aug 19, 2004 3:43 pm    Post subject: Reply with quote

Quote:

Is it possible to use the original printer drivers instead of the cups or adobe drivers?

No it is not (at least not on the server side). And it would not make much sense to use a CUPS server.

AFAIK The CUPS and Adobe drivers are nothing but quite generic PostScript drivers that make every printer attached to the printserver look like a nice PostScript printer.

The CUPS server and the ppd control the features of the printer and which of them can be used. So it all depends on the ppd, when a particular feature of the printer is not supported in it then that feature cannot be used via CUPS. Where did you get the PPD for that Toshiba printer of yours? Was it supplied on the driver CD by Toshiba? If so then it should support all printer features. I am asking because there seems to be no entry for Toshiba at all on LinuxPrinting.org.

This has nothing to do with the CUPS Windows drivers or the Adobe ones (if I am not mistaken).

Maybe you should consider using a Windows 2000 machine as the printserver for you particular printer, then you could be at least assured that every feature is supported.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
Naughtyus
Guru
Guru


Joined: 14 Jul 2002
Posts: 463
Location: Vancouver, BC

PostPosted: Tue Aug 24, 2004 4:34 am    Post subject: Reply with quote

I'm really having problems with Samba printing.

I have a Linux server, running cups and samba with an HP 932C DeskJet printer attached and working fine locally.

On Windows clients, they are able to see and install the printer without problem (I have them use their own drivers), however they are never actually able to send any print jobs to the printer. WinXP clients end with an error:

"User Intervention required: unable to connect to printer"

and Win98 clients have a similar error...
Please help!

My smb.conf is as follows:

Code:
[global]
   workgroup = RKO
   server string = Samba Server %v
   printcap name = cups
   load printers = yes
   printing = cups
   browseable = yes
   log file = /var/log/samba/log.%m
   max log size = 50
   hosts allow = 192.168.0. 127.
   security = share
   encrypt passwords = yes
   smb passwd file = /etc/samba/private/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
   log level = 4

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   guest ok = no
   read only = yes
   write list = @adm root

[HPDeskjet]
   comment = HP DeskJet 932C
   printable = yes
   path = /var/spool/samba
   guest ok = yes
   public = yes
   printable = yes
   printer admin = @adm root

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   public = yes
   writable = no
   printable = yes
   printer admin = @adm root
Back to top
View user's profile Send private message
OhSh33t
Apprentice
Apprentice


Joined: 03 Sep 2003
Posts: 169
Location: South-Seattle Park

PostPosted: Sat Aug 28, 2004 3:45 pm    Post subject: Reply with quote

Thanks for the howto. I've gotten file sharing working very nicely. Was using WinSCP all the time to move files from Windows to Linux and vicea-versa. Now, we have one central server that everyone can connect to. SWeetness..

Print Sharing is fugly though.

# cupsaddsmb (has proven to drive me absolutely bonkers)

Ok.. I've been at this for almost a day now. I'm starting to go batty. I must be missing something really small. I've started from scratch 3 times now. I've googled my brains out as well as looked at all the official samba 3 printing docs..

No matter what I do I keep getting:

Code:

root@toejam samba # cupsaddsmb -H localhost -U root -h localhost -v HP
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%**********' -c 'mkdir W32X86;put /var/spool/cups/tmp/41309be5dcc4f W32X86/HP.ppd;put /usr/share/cups/drivers/cupsdrv5.dll W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp W32X86/cups5.hlp'
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME


[EDIT/UPDATE]
After going completely crazy I looked at the info contained here.

Only after switching "security = user" in smb.conf as well as using
Code:
root# cupsaddsmb -U root -v HP

.... then the command completed successfully..

I'm running my own DNS internally and all hosts resolve just fine by name. I can print locally from the Samba server. All windows clients can browse the shares created on the Samba/Gentoo server.... but trying to print a file on a windows machine is a crap shoot at best.

First off it seems that I have to place the file I want to print inside one of my samba shares first and then I can print. I thought I could just open a file in WinXP and ... example.. "Test.txt" and choose "file>print and choose my network printer".. I see it get spooled up and nothing happens.. If I place that same file on one of the samba shares and then print the file from within the samba share it works.. PDF's will not print what so ever..... So now its onto cups trouble shooting.. WooHoo.. allmost there..

[UPDATE/EDIT] My Windows client printing problems were all due to WinXP service pak2 auto installing MS's firewall.. as soon as I turned that off.. all is well.. To funny.. Microsoft is now finally getting their firewalling down. "A day late and a dollar short" if you ask me..

Even after I added udp port 631 to the WinXP Pro firewall rules it was still denying print requests with some kind of communication happening on source port tcp 139... funny thing is.. that this port is already allowed.. MS firewall bug.. Heh...
_________________
JB
Back to top
View user's profile Send private message
pharaoh
Apprentice
Apprentice


Joined: 20 Nov 2003
Posts: 211
Location: Pennsylvania

PostPosted: Fri Sep 03, 2004 6:16 am    Post subject: Reply with quote

This was a solid HOWTO. I never would have got this setup in this amount of time otherwise!!

One problem I ran into was in the cupsd.conf...I had to change the print server name to "localhost" instead of the hostname that the clients were used to.

I'm serving an HP3650 to two other Gentoo boxes, and once I had everything setup correctly I didn't even have to add the printers to the clients :D

IT'S GENTOO MAGIC!!!!
_________________
RYZEN 5 3600 Matisse (Zen 2) 6-Core 3.6 GHz Socket AM4 65W
ASRock B550M PRO4
Crucial Ballistix 3200 MHz DDR4 DRAM 16GB
EVGA GeForce GTX 1060 6GB
Back to top
View user's profile Send private message
Chewieip
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2004
Posts: 79
Location: Girona, Spain

PostPosted: Fri Sep 03, 2004 9:09 am    Post subject: Reply with quote

First at all, what a great How-To!!!! It has been too usefull to me, but when I'm installing my windows drivers I've a little problem.

When the cupsaddsmb -H PrinterServer -U root -h PrinterServer -a asks me about the root password I write it but doesn't works.

I thought I forgot my root samba password so I run another time
Code:
 smbpasswd -a root
, and when I Type a new password and it wants to update it, returns an error like this:

Code:
 Failed to open account policy database


Anyone knows why it happens?
Back to top
View user's profile Send private message
pharaoh
Apprentice
Apprentice


Joined: 20 Nov 2003
Posts: 211
Location: Pennsylvania

PostPosted: Fri Sep 03, 2004 3:49 pm    Post subject: Reply with quote

I was getting the same thing. I'm using v3, which samba version are you using?

I ended up reinstalling samba and adding users with pdbedit...when I tried using pdbedit or smbpasswd I kept getting the same error you are.
_________________
RYZEN 5 3600 Matisse (Zen 2) 6-Core 3.6 GHz Socket AM4 65W
ASRock B550M PRO4
Crucial Ballistix 3200 MHz DDR4 DRAM 16GB
EVGA GeForce GTX 1060 6GB
Back to top
View user's profile Send private message
Chewieip
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2004
Posts: 79
Location: Girona, Spain

PostPosted: Sat Sep 04, 2004 9:37 am    Post subject: Reply with quote

I've also the latest version 3.0.5. And if you say, reinstalling samba doesn't solve the problem, it has to be something more.

I'm confused.
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Sat Sep 04, 2004 9:08 pm    Post subject: Reply with quote

First of all I am sorry, but I just don't had/have the time to look after this thread lately. Hopefully I'll have more time in a week or two.

OhSh33t: I believe you overread it but I've mentioned it more than once: anything else than security = user seems to only cause lots of fricken trouble :)
me wrote:

Do not set anything else than security = user (it's the default) in your smb.conf. Only causes trouble and bears many security risks if set to share, server, whatever. Read up on the topic in the official Samba HOWTO collection.


Chewieip: Have you a directive like passdb backend = ... in your smb.conf? When you reinstall Samba backup your smb.conf and delete or move /etc/samba. Then put smb.conf back in, edit it and set passdb backend = tdbsam (the global section). Only after that do a pdbedit -a -u root and pdbedit -a -u any_other_users.

pharaoh: CUPS rules, don't you think? :D

One CUPS server is enough and every other CUPS-installed client gets the available printers broadcasted to, ready to use. Simple as that once everyhting is up and running. That's CUPS's purpose :)

Regarding cupsd.conf: if you don't have a DNS running or a well configured /etc/hosts on every client then I believe the server (as well as the clients) wouldn't be able to resolve any other name than "localhost" correctly. I probably should update the guide to clarify that.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
xlulux
n00b
n00b


Joined: 20 Aug 2004
Posts: 63

PostPosted: Sun Sep 05, 2004 6:11 am    Post subject: i dont get far without errors Reply with quote

hey guys i get to the point where you install it and then run cupsd and it gives me this error

* Starting cupsd...
cupsd: Child exited on signal 15! [ !! ]


then i check error_log file and i get this line

X [05/Sep/2004:16:51:47 -0700] No valid Listen or Port lines were found in the configuration file!

i dont know what could be wrong, here is my smb.conf and my cupsd.conf

Code:

ServerName linux          # your printserver name
ServerAdmin vicente_louvet@yahoo.com    # the person for printer-related hate-mail, eg you

AccessLog /var/log/cups/access_log ## probably doesn't need changing
ErrorLog  /var/log/cups/error_log  ## doesn't really need changing either

LogLevel  debug # only while isntalling and testing, should later be changed to 'info'

MaxClients 100 ## I've had to set this to 1000000000 or so because some time back,
               ## there seemed to be a bug in CUPS' controlling of the web interface,
               ## making CUPS think a denial of service attack was in progress when
               ## I tried to configure a printer with the web interface. weird.

BrowseAddress @IF(eth0) ## eg @IF(eth1) or @IF(dc0)

<Location />
Order Deny,Allow
Deny From All
Allow From 192.168.0.*  ## the addresses of your internel network
                        ## eg 192.168.0.* will allow connections from any host on
                        ## the 192.168.0.0 network. change to whatever suits you
</Location>

<Location /admin>
AuthType Basic
AuthClass System
Allow From 192.168.0.*  ## same as above, allow any host on the 192.168.0.0 network
                        ## to connect and do administrative tasks after authenticating
Order Deny,Allow
Deny From All
</Location>



and smb.conf as promised

Code:

[global]
      # Required to support Windows 98 or above
   encrypt passwords = yes

   # Files that have UNIX permissions that prohibit access are hidden from users
   hide unreadable = no

   # We don't have any OS/2 clients       
   lm announce = no

   # We log all activity to a single file for regular review
   log file = /var/log/samba.log

   # We want a minimum level of logging
   log level = 2

   # All our computers are Windows XP
   lanman auth = no   

   # What NetBIOS name does our server call itself?
   netbios name = linux

   # We rely on username/password access methods
   security = share
       
   #dont allow root to logon
   invalid users = root @wheel

   # What description should be shown in the share list?
   server string = "Samba Server"

   # These options are appropriate for most LAN's
   socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192

   # We never want Samba to decide for us where to put the password file
   smb passwd file = /etc/samba/private/smbpasswd

   # We support the NET TIME syntax from workstations
   time server = yes

   # We will provide NetBIOS name resolution (WINS) support for clients
   wins support = yes

   # This is our domain/workgroup name
   workgroup = PNM

   # Uncomment this if you want a guest account, you must add this to /etc/passwd
   # otherwise the user "nobody" is used
   guest account = vicente

   #load printers
   load printers = yes

   #what type of printing
   printing = cups

   printcap name = cups

[homes]
 path = /home/vicente   
       delete readonly = yes
       create mask = 0600
       writeable = yes
       browsable = yes
         mangle case = yes
    case sensitive = no
    guest only = yes   

[media]
 path = /home/vicente/music
         delete readonly = yes
         create mask = 0600
         writeable = yes
         browsable = yes
         mangle case = yes
         case sensitive = no
         guest only = yes

[print$]
  comment = Printer Drivers
  path = /etc/samba/printer # this path holds the driver structure
  guest ok = yes
  browseable = yes
  read only = yes
  write list = username,root      # add a username to the write list if you
                                  # don't only want root to be the only
                                  # printer admin (see next section)
[printers]      # here all printers will be shown; this becomes the Printers
                # share/section under Network Neighborhood
  comment = All Printers
  path = /var/spool/samba
  browseable = no
  public = yes
  guest ok = yes
  writable = no
  printable = yes
  printer admin = printer_username,root



i hope you guys can help, talk to me if you need any other information this is really bugging me cause i need a printerserver set up yesterday

thanks in advance
[/quote]
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Sun Sep 05, 2004 9:34 am    Post subject: Reply with quote

xlulux: Does your cupsd.conf contain only the lines you just posted? If so then you were mistaken. Your cupsd.conf should contain a lot more; in the file you should have edited the lines I explained in the guide, not generate a new file with just those few lines.

If you did not backup it before overwriting it (assuming you really overwrote it) then delete /etc/cups, reinstall it and then edit the standard /etc/cups/cupsd.conf file appropriately.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
xlulux
n00b
n00b


Joined: 20 Aug 2004
Posts: 63

PostPosted: Sun Sep 05, 2004 5:59 pm    Post subject: Reply with quote

hey guys

having some trouble printing the test page, this is the error i get

E [06/Sep/2004:04:24:05 -0700] get_printer_attrs: resource name '/printers/*.' no good!
D [06/Sep/2004:04:24:05 -0700] Sending error: client-error-not-found


along side with this error

E [06/Sep/2004:04:44:05 -0700] restart_job: job #7 cannot be restarted - no files!
D [06/Sep/2004:04:44:05 -0700] Sending error: client-error-not-possible
D [06/Sep/2004:04:44:05 -0700] ProcessIPPRequest: 7 status_code=404



im kind of stumped on what to do. i set up the ppd for it and everything it just wont print, any help would be very valuable
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Mon Sep 06, 2004 6:38 am    Post subject: Reply with quote

This is for everybody who encounters the NT_STATUS_BAD_NETWORK_NAME error when using cupsaddsmb! Dan Herrington mailed me a solution which should/could work for most of you (I already updated the guide). If not then your problems (obviously) lie elsewhere :)

In the [print$] section of your smb.conf file you specify the path which holds the printer driver structure. That line in the config file includes a comment which says "this path holds the driver structure". That comment is the problem, since it is on the same line. Put if BEFORE or AFTER! Otherwise Samba looks for a share with the path literally named "/etc/samba/printer # this path holds ..." which of course does not exist.

So change this:
Code:

[print$]
  ...
  path = /etc/samba/printer # this path holds the printer structure
  ...

to this:
Code:

[print$]
  ...
  # this path holds the printer structure
  path = /etc/samba/printer
  ...

And at least another source of problems should be gone for good.

It also seems to be a good idea to this for every comment in your smb.conf file. Put it on one or more lines for itself. Just to be sure.

Thanks a lot to Dan Herrington! :D
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
splaTTer
n00b
n00b


Joined: 09 Sep 2004
Posts: 4

PostPosted: Thu Sep 09, 2004 4:08 pm    Post subject: does not work?! Reply with quote

Hi,
i get a new error i think. found nowhere (google, usenet, forum here, mailinglists) else the same problem. i love that :(

thsts what i get:
Code:

gentux root # cupsaddsmb -a -v
Password for root required to access localhost via SAMBA:
Running command: smbclient //localhost/print\$ -N -U'root%xxxxxx' -c 'mkdir W32X86;put /var/spool/cups/tmp/414098a2ed6d5 W32X86/HPP1000.ppd;put /usr/share/cups/drivers/cupsdrv5.dll W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp W32X86/cups5.hlp'
Domain=[GENTUX] OS=[Unix] Server=[Samba 3.0.5]
putting file /var/spool/cups/tmp/414098a2ed6d5 as \W32X86/HPP1000.ppd (2721.4 kb/s) (average 2721.4 kb/s)
putting file /usr/share/cups/drivers/cupsdrv5.dll as \W32X86/cupsdrv5.dll (528.4 kb/s) (average 557.6 kb/s)
putting file /usr/share/cups/drivers/cupsui5.dll as \W32X86/cupsui5.dll (498.6 kb/s) (average 531.0 kb/s)
putting file /usr/share/cups/drivers/cups5.hlp as \W32X86/cups5.hlp (3475.0 kb/s) (average 543.3 kb/s)

Running command: rpcclient localhost -N -U'root%xxxxxx' -c 'adddriver "Windows NT x86" "HPP1000:cupsdrv5.dll:HPP1000.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"'
result was WERR_ACCESS_DENIED

Password for root required to access localhost via SAMBA:



and here is my smb.conf:
Code:

[global]

# Replace MYWORKGROUPNAME with your workgroup/domain
workgroup = DGC

# Of course this has no REAL purpose other than letting
# everyone know its not Windows!
# %v prints the version of Samba we are using.
server string = Samba Server %v

# We are going to use cups, so we are going to put it in here ;-)
printcap name = cups
printing = cups
load printers = yes
use client driver = no

# We want a log file and we do not want it to get bigger than 50kb.
log file = /var/log/samba/log.%m
max log size = 50

# We are going to set some options for our interfaces...
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# This is a good idea, what we are doing is binding the
# samba server to our local network.
# For example, if eth0 is our local network device
interfaces = lo eth0
bind interfaces only = yes

# Now we are going to specify who we allow, we are afterall
# very security conscience, since this configuration does
# not use passwords!
hosts allow = 127.0.0.1 192.168.0.0/24
hosts deny = 0.0.0.0/0

# Other options for this are USER, DOMAIN, ADS, and SERVER
# The default is user
security = user

# No passwords, so we're going to use a guest account!
guest account = gast
guest ok = yes

# We now will implement the on access virus scanner.
# NOTE: By putting this in our [Global] section, we enable
# scanning of ALL shares, you could optionally move
# these to a specific share and only scan it.

# For Samba 3.x
vfs object = vscan-clamav
vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

# Now we setup our print drivers information!
[print$]
comment = Printer Drivers
path = /etc/samba/printer
guest ok = yes
browseable = yes
read only = yes

# Modify this to "username,root" if you don't want root to
# be the only printer admin)
write list = admin,root

# Now we'll setup a printer to share, while the name is arbitrary
# it should be consistent throughout Samba and CUPS!
[HPP1000]
comment = HP Photosmart P1000
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes

# Modify this to "username,root" if you don't want root to
# be the only printer admin)
printer admin = admin,root

# Now we setup our printers share.  This should be
# browseable, printable, public.
[printers]
comment = All Printers
browseable = no
printable = yes
writable = no
public = yes
guest ok = yes
path = /var/spool/samba
printer admin = admin,root

# We create a new share that we can read/write to from anywhere
# This is kind of like a public temp share, anyone can do what
# they want here.
[public]
comment = Public Files
browseable = yes
public = yes
create mode = 0766
guest ok = yes
path = /home/samba/public


i also did
Code:

smbpasswd -a root
smbpasswd -a gast  (with empty password)
smbpasswd -a admin


"admin" and "gast" are known to my /etc/passwd:
Code:

samba:x:300:300:SambaUser:/home/samba:/bin/false
admin:x:301:300:SambaUser:/home/samba:/bin/false
gast:x:302:300:SambaUser:/home/samba:/bin/false


and i got a smbuser group in /etc/group:
Code:

smbuser:x:300:


permissions are:
Code:

/etc/samba/printers is 777
/var/spool/samba is 777  (found in some howto)


did i miss anything?

What can i do?!
Back to top
View user's profile Send private message
blibbleage
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 84
Location: Cambridge, UK

PostPosted: Mon Sep 20, 2004 10:51 am    Post subject: Reply with quote

Yet another problem sharing a printer with windows computers. I followed through the HOWTO and it all went fine. Here's the relevant part of /etc/samba/smb.conf

Code:

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# to allow user 'guest account' to print.
   public = yes
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700
   printer admin = @adm root

# =====================================
# print command: see above for details.
# =====================================
   print command = lpr-cups -P %p -o raw %s -r   # using client side printer dri
vers.
;   print command = lpr-cups -P %p %s # using cups own drivers (use generic Post
Script on clients).
# The following two commands are the samba defaults for printing=cups
# change them only if you need different options:
;   lpq command = lpq -P %p
;   lprm command = cancel %p-%j

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   write list = @adm root
   guest ok = yes

[ML1510]
   comment = Samsung ML1510 Laser Printer
   printable = yes
   path = /var/spool/samba
   public = yes
   guest ok = yes
   printer admin = @adm root


This was mostly taken from /etc/samba/smb.conf.example, but changed according to the HOWTO. I left /var/lib/samba/printers as the directory for the printer drivers because the subdirectories (W32X86 etc.) were already present at that location.

I've set it all up fine, and cupsaddsmb worked (once I set the guest account to one which actually existed in /etc/passwd: ftp). It gave the following output:

Code:

Password for root required to access localhost via SAMBA:
Running command: rpcclient localhost -N -U'root%########' -c 'setdriver ML1510 ML1510'
Succesfully set ML1510 to driver ML1510.


This command didn't install any files in /var/lib/samba/printers/W32X86/ though, so I installed them myself: I copied ML1510.ppd, cups5.hlp, cupsdrv5.dll and cupsui5.dll to that directory, then created two subdirectories called "2" and "3" and copied them there as well. If that's unclear, here's a directory listing:

Code:

# pwd
/var/lib/samba/printers/W32X86
# ls -R
.:
2  3  ML1510.ppd  cups5.hlp  cupsdrv5.dll  cupsui5.dll

./2:
ML1510.ppd  cups5.hlp  cupsdrv5.dll  cupsui5.dll

./3:
ML1510.ppd  cups5.hlp  cupsdrv5.dll  cupsui5.dll


I can see the printer from a windows (XP) machine, but when I try to connect to it, it says "The server for the 'ML1510' printer does not have the correct driver installed".

Any ideas why it can't find the driver? What else can I try?

Thanks!
Back to top
View user's profile Send private message
revresxunil
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2002
Posts: 129
Location: UW Madison

PostPosted: Tue Sep 21, 2004 6:08 pm    Post subject: Reply with quote

I have the same problem... cupsaddsmb doesnt do anything... Have you figured out what is causing that?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 9, 10, 11  Next
Page 6 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum