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, 4, 5, 6 ... 9, 10, 11  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pubecon
Guru
Guru


Joined: 03 Mar 2003
Posts: 342
Location: Glasgow, Scotland

PostPosted: Thu Jul 22, 2004 10:54 pm    Post subject: Reply with quote

I had an unrelated pdf problem where the printer itself was complaining about instructions being sent to it.

The solution was to check the "print as image" box in the adobe acrobat print dialogue.


I know this is completely unrelated but sometimes it is nice for a random suggestion work and not ever have to care why than have to learn the core of a topic just to comprehend such a one-off problem.


surely it isn't something as simple as "Print Page 1 to 1"?!
Back to top
View user's profile Send private message
Benji-Boy
n00b
n00b


Joined: 13 Jul 2004
Posts: 13

PostPosted: Fri Jul 23, 2004 8:30 am    Post subject: Printing TO a windows print queue FROM linux Reply with quote

Hey guys,

Thanks for the great tutorial so far. Learning.

Ok. I am tryin to print from my linux box to a network print server called printserv on a HP LaserJet 4300 called hp228. (it's in room 228 :lol: )

Thus far I have Samba and cups installed and they're running.
I have downloaded the correct .ppd file and put it in the right place.

I have also made sure the smb backend is running alright in the logs etc.

Now. I am running KDE so i did most of the server configuration through the settings-print manager.

Server config:
I set the name of the host to my 'computer_name', also tried 'localhost' and '127.0.0.1'.

Printer:
add printer/class
I can browse and find the workgroup/host/name
in this specific case it is

CS-NT
printserv
hp228

(i can also ping them FYI)

However... when i go to print a test page it says that the test page has been set and is printing successfully.

However in the "jobs" for the newly added printer it tells me that the job was aborted-by-system.

I had a look in the error_lod file and it is having trouble resolving the host name. this happens with my_computer_name, localhost, 127.0.0.1, the IP of the network printer also.

I have successfully printed using:
Code:

smbclient //printserv/hp228 -I IP.AD.DR.ESS -N -c 'print <filename>.ps'


I'd really like to get this sorted out soon as i have yet to tackel gettin Open office and other apps to print using this printer.

Any assistance is greatly appreciated.
Thanks in advance,
Benji-Boy

I am happy to post any logs, configs etc
_________________
How can one learn if one does not try?
Failure is temporary.
[>=We are what we choose to do=<]
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


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

PostPosted: Fri Jul 23, 2004 9:02 am    Post subject: Reply with quote

Benji-Boy: I am not exactly sure what you are trying to do. Print from a Linux client to a Linux (print)server? Print from a Linux client to a Windows (print)server? What do you mean by "network print server"? One of those small devices with an ethernet and a parallel port?

If it's Linux --> Linux printing you don't need Samba, only working CUPS installations on both machines. The server needs to be configured correctly (see the how-to), the client doesn't really need any special attention. You would simply print by using lpr -Pprintername

If it's Linux --> Windows printing then I am sorry, but I am not very familiar with that and as you can see I didn't cover it in the guide.

Ditto for the third possibility with the network print server device.

If none of these is the case please explain your setup and your environment.

Anyway, make sure your DNS entries are correct or your /etc/hosts files on the printer server and on the client contain at least these lines:
127.0.0.1 localhost
AA.BB.CC.DD local_machine_name

_________________
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
Benji-Boy
n00b
n00b


Joined: 13 Jul 2004
Posts: 13

PostPosted: Sat Jul 24, 2004 2:54 am    Post subject: Printing TO a windows print queue FROM linux Reply with quote

Daff: Sorry I put the goal in the subject line but I should have been more clear.

I know you didn't cover it in the guide but hey, I know you're a clever guy so i had a stab at asking on this thread.

Thanks for you help.

This guide worked beautifully for printers that are physically attached to the machine operating as the printserver listenining for connections on port 631.

However my goall in short is:
To run a CUPS server on my linux box which listens for local jobs (essentially printing open office docs and pdf files etc) then prints the postscript file to a remote windows print queue (via samba backend) located on a LAN hosted by a machine called 'printserv' which controlls a HP LaserJet 4300 called hp228 (among other printers).

clearer?:lol:

Which according to the error logs it is having trouble resolving:
Code:

E [23/Jul/2004:19:24:40 +1000] httpGetHostByName("//printserv/hp228") failed - Unknown host!
E [23/Jul/2004:19:24:40 +1000] Bad BrowseAddress //printserv/hp228 at line 736.


What do the letters down the left hand side of the error logs stand for.
I set the logs to debug detailed. (and yes there is a lot of stuff which is much more helpful than before.)


Yes DNS is all working fine.
I can 'ping' both printserv and hp228.

here is /etc/hosts
Code:

127.0.0.1       localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


So according to your suggestion I'll add MY_CLIENT_MACHINE_IP and Client_machine_name on the second line.

Additional info:
I can select and configure the printer by scanning the network using KDE Printer Manager and the online admin. So CUPS CAN _find_ the printer. I can go through the wizard but, no test page print results.
According to the local CUPS Job manager the system aborts the jobs both as a regular user and root. (which makes perfect sense if it can't resolve the printer address.)

I'll try putting the IP of the printserver and the printserv name in /etc/hosts too.

I think you have solved at least part of the problem. I'll let you know monday after i have along chat with sys admin about host resolution.

Thanks heaps Daff. :D

Benji-Boy
_________________
How can one learn if one does not try?
Failure is temporary.
[>=We are what we choose to do=<]
Back to top
View user's profile Send private message
Benji-Boy
n00b
n00b


Joined: 13 Jul 2004
Posts: 13

PostPosted: Sat Jul 24, 2004 4:03 am    Post subject: Printing TO a windows print queue FROM linux Reply with quote

Ok fixed the first problem.
I added the local hosts and the printserver host to /etc/hosts

The following is Debug level errorlog with some irrelevant bits snipped.
Code:

I [24/Jul/2004:13:24:08 +1000] Job 11 queued on 'hp228' by 'root'.
D  StartJob() id = 11, file = 0/1
D  StartJob: argv = "hp228","11","root","KDE Print Test","1","m
ultiple-document-handling=separate-documents-uncollated-copies orientation-requested=3","/v
ar/spool/cups/d00011-001"
D  StartJob: envp[0]="PATH=/usr/lib/cups/filter:/bin:/usr/bin"
D  StartJob: envp[2]="USER=root"
D  StartJob: envp[5]="PPD=/etc/cups/ppd/hp228.ppd"
----------------------
*This is the ppd generated by printer configuration from */usr/share/cups/model/HP-LaserJet_4300-Postscript.ppd
--------------------------
D  StartJob: envp[9]="CONTENT_TYPE=application/postscript"
D  StartJob: envp[10]="DEVICE_URI=smb://CS-NT/PRINTSERV/hp228"
D StartJob: envp[11]="PRINTER=hp228"
D StartJob: envp[14]="CUPS_SERVER=localhost"
D StartJob: envp[15]="IPP_PORT=631"
D [24/Jul/2004:13:24:08 +1000] StartJob: statusfds = [ 8 9 ]
D [24/Jul/2004:13:24:08 +1000] StartJob: filterfds[1] = [ 10 -1 ]
I Started filter /usr/lib/cups/filter/pstops (PID 24130) for job 11.
I Started filter /usr/lib/cups/filter/foomatic-rip (PID 24131) for job 11.
I Started backend /usr/lib/cups/backend/smb (PID 24132) for job 11.
E PID 24131 stopped with status 22!
D [Job 11] /usr/lib/cups/filter/foomatic-rip: No such file or directory
D [24/Jul/2004:13:24:08 +1000] CloseClient() 7
--------------------
*The log described the resuming listening to the client sendin in the test page
---------------------
D  [Job 11] 0 %%EOF
D  [Job 11] Saw EOF!
D  UpdateJob: job 11, file 0 is complete.
D  CancelJob: id = 11
D  StopJob: id = 11, force = 0
D  StopJob: printer state is 3
D  AcceptClient() 7 from localhost:631.


What i dont understand is why is it trying to use foomatic (PID 24131). I haven't got it emerged on my system.

Samba should be fine (PID 24132) Yet this PID never terminates.

Any ideas on how to prevent foomatic from trying to run?
It seems to be stuffing things up is this true?

I'll try installing foomatic and configuring that but it really shouldn't be necessary according to the linux.org howtopage.

Is there something i am missing in the configuration process to prevent the launch of foomatic?

Is foomatic even the issue here?
I am very new to these kinds of forums and I'm unsure of etiquette etc.
Please let me know.

Benji-Boy
_________________
How can one learn if one does not try?
Failure is temporary.
[>=We are what we choose to do=<]
Back to top
View user's profile Send private message
matbouch
n00b
n00b


Joined: 02 Aug 2004
Posts: 1

PostPosted: Mon Aug 02, 2004 9:42 pm    Post subject: Reply with quote

yokem55 wrote:
Okay, I finally got this working. Our winxp (the fiance is loathe to give up windows, sigh) laptop now can print to the printer hooked up to the desktop using the autodownloaded cups drivers. However, whenever I try to go to the printer properties page under windows, I get an ugly error box instead.
Code:
Function address 0xa90450e caused a protection fault.  (exception code 0xc0000005) Some or all property page(s) may not be displayed.


Some googleing turned up this post in a news group. Apparently the ppd might be at fault, but my error message does not match this person's while the general symptoms do. Any advice on solving this one?


I don't know if somebody has found a better solution for this problem, but here is what I did to solve it :

I found the following informations here : http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html

Quote:
6.8.2. IMPORTANT! Setting Device Modes on new Printers

In order for a printer to be truly usable by a Windows NT/2K/XP client, it must possess:

* a valid Device Mode generated by the driver for the printer (defining things like paper size, orientation and duplex settings), and
* a complete set of PrinterDriverData generated by the driver.

If either one of these is incomplete, the clients can produce less than optimal output at best. In the worst cases, unreadable garbage or nothing at all comes from the printer or they only harvest error messages when attempting to print. Samba stores the named values and all printing related info in its internal TDB database files (ntprinters.tdb, ntdrivers.tdb, printing.tdb and ntforms.tdb).

What do these two words stand for? Basically, the Device Mode and the set of Printer Driver Data is a collection of settings for all print queue properties, initialized in a sensible way. Device Modes and PrinterDriverData should initially be set on the print server (that is here: the Samba host) to healthy values so that the clients can start to use them immediately. How do we set these initial healthy values? This can be achieved by accessing the drivers remotely from an NT (or 2k/XP) client, as is discussed in the next paragraphs.

Be aware, that a valid Device Mode can only be initiated by a "printer admin", or root (the reason should be obvious). Device Modes can only correctly be set by executing the printer driver program itself. Since Samba can not execute this Win32 platform driver code, it sets this field initially to NULL (which is not a valid setting for clients to use). Fortunately, most drivers generate themselves the PrinterDriverData that is needed, when they are uploaded to the [print$] share with the help of the APW or rpcclient.

The generation and setting of a first valid Device Mode however requires some "tickling" from a client, to set it on the Samba server. The easiest means of doing so is to simply change the page orientation on the server's printer. This "executes" enough of the printer driver program on the client for the desired effect to happen, and feeds back the new DeviceMode to our Sanba server. You can use the native Windows NT/2K/XP printer properties page from a Window client for this:

* Browse the "Network Neighbourhood"
* Find the Samba server
* Open the Samba server's "Printers and Faxes" folder
* Highlight the shared printer in question
* Right-click the printer (You may already be here, if you followed the last section's description)
* At the low end of the context menu select "Properties...." (if the menu still offers the "Connect..." entry further above, you need to click that one first to achieve the driver installation as shown in the last section)
* Go to the "Advanced" tab; click on "Printing Defaults..."
* Change the "Portrait" page setting to "Landscape" (and back)
* (Oh, and make sure to apply changes between swapping the page orientation to cause the change to actually take effect...).
* While you're at it, you may optionally also want to set the desired printing defaults here, which then apply to all future client driver installations on the remaining from now on.

This procedure has executed the printer driver program on the client platform and fed back the correct Device Mode to Samba, which now stored it in its TDB files. (Once the driver is installed on the client, you can follow the analogous steps by accessing the *local* "Printers" folder too if you are a Samba printer admin user.) From now on printing should work as expected.

Samba also includes a service level parameter name default devmode for generating a default Device Mode for a printer. Some driver will function fine with Samba's default set of properties. Others may crash the client's spooler service. So use this parameter with caution. It is always better to have the client generate a valid device mode for the printer and store it on the server for you.


The error comes from the bad settings in samba with some printer models. What I did to solve this problem :

1 - Added one of my windows users as printer admin and in the write list of print$ share
2 - Commented the print$ share in smb.conf
3 - Connected to the printer and installing the clients drivers (not the ones from the samba server)
4 - Uncommented the print$ share and restarted samba
5 - Opened the default settings, changed the paper to landscape and saved
6 - uninstalled the printer on the windows client and reconnected with the samba drivers

I can now open the printer properties with any windows clients.
_________________
Linux 2.6.11 i686 gentoo
Mozilla Firefox v1.0.3
KDE v3.4.0
Back to top
View user's profile Send private message
goulash
n00b
n00b


Joined: 23 Apr 2004
Posts: 47
Location: Perth, Western Australia

PostPosted: Thu Aug 05, 2004 4:16 am    Post subject: Reply with quote

huge thanks for this, even thought i havent read it yet ;)

im planning to move my high schools(im the it tech) print server over to gentoo, the win2k3 server needs to be reset every 3days and its annoying :(
Back to top
View user's profile Send private message
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Sat Aug 07, 2004 1:10 am    Post subject: Reply with quote

[EDITED - SOLVED MOST OF THE ISSUES]

Hello. I edited this because I solved some of the isues. Right now I am stuck at the 'cupsaddsmb' command.
when I type:

Code:

cupsaddsmb -H [color=red]my_print_server[/color] -U [color=red]my_print_server[/color] -h keg -v -a


i get this error:
Code:

Password for root required to access keg via SAMBA:
Running command: smbclient //keg/print\$ -N -U'root%PASSWD' -c 'mkdir W32X86;put /var/spool/cups/tmp/41144f605c74a W32X86/HP840C.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=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME


my smb.conf is this:

Code:
[global]
# Replace MYWORKGROUPNAME with your workgroup/domain
workgroup = WORKGROUP
# 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
# 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 10.10.10.
hosts deny = 0.0.0.0/0
# Other options for this are USER, DOMAIN, ADS, and SERVER
# The default is user
security = share
# No passwords, so we're going to use a guest account!
guest account = samba
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
;fs object = vscan-clamav
;scan-clamav: config-file = /etc/samba/vscan-clamav.conf

# For Samba 2.2.x
;fs object = /usr/lib/samba/vfs/vscan-clamav.so
;fs options = config-file = /etc/samba/vscan-clamav.conf

# Now we setup our print drivers information!
[print$]
comment = Printer Drivers
path = /etc/samba/printer # this path holds the driver structure
guest ok = no
browseable = yes
read only = yes
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
write list = root

# Now we'll setup a printer to share, while the name is arbitrary
# it should be consistent throughout Samba and CUPS!
[HP840C]
comment = HP DeskJet 840C Network Printer
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 = root

# Now we setup our printers share.  This should be
# browseable, printable, public.
[printers]   
comment = All Printers
browseable = yes   
printable = yes   
public = yes   
guest ok = yes
path = /var/spool/samba
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
printer 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/dcorujo/share

[Musica]
comment = Music Files
browseable = yes
public = yes
writable = no
printable = no
path = /mnt/fat32/Musica/

[MCP2K4]
comment = Minho Campus Party 2k4
browseable = yes
public = yes
writable = no
printable = no
path = /mnt/windows/Documents\ and\ Settings/Daniel/Desktop/mcp2k4/


Anyone can help?

P.S. - I also noticed that on most of the people posting here, they would get on their cupsaddsmb output something about

Code:
added interface ip=192.168.0.133 bcast=192.168.0.255 nmask=255.255.255.0


I'm not getting it... am I doing something wrong?

Thanks for reading and... please help!!!
Back to top
View user's profile Send private message
goulash
n00b
n00b


Joined: 23 Apr 2004
Posts: 47
Location: Perth, Western Australia

PostPosted: Mon Aug 09, 2004 4:27 am    Post subject: Reply with quote

for our windows print server we use a program called papercut which gives the students printing accounts with a certain ammount of money they get to print with. they can top it up and things like that. i was wondering if anyone would know of a similar program for linux?
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


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

PostPosted: Tue Aug 10, 2004 2:03 pm    Post subject: Reply with quote

newbie_gentoo wrote:

Right now I am stuck at the 'cupsaddsmb' command.
when I type:

Code:

cupsaddsmb -H [color=red]my_print_server[/color] -U [color=red]my_print_server[/color] -h keg -v -a


This doesn't look right. The syntax is
Code:

# cupsaddsmb -H printerserver -h sambaserver -U root -v [-a]

printerserver == sambaserver almost always, so the command line should read
Code:

# cupsaddsmb -H keg -h keg -U root -v -a

in your case.

Instead of root you can also use a valid user that has the permissions to admin the printer. You probably don't have one and should use root for that task anyway.

HTH
_________________
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
daff
Apprentice
Apprentice


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

PostPosted: Tue Aug 10, 2004 2:12 pm    Post subject: Re: Printing TO a windows print queue FROM linux Reply with quote

Benji-Boy: I am not really familiar with printing from CUPS/Samba to Windows servers, can't really help you on that (the other way round works much smoother IMHO :))

Benji-Boy wrote:
Ok fixed the first problem.
I added the local hosts and the printserver host to /etc/hosts

The following is Debug level errorlog with some irrelevant bits snipped.
Code:

I [24/Jul/2004:13:24:08 +1000] Job 11 queued on 'hp228' by 'root'.
D  StartJob() id = 11, file = 0/1
D  StartJob: argv = "hp228","11","root","KDE Print Test","1","m
[...]
D [24/Jul/2004:13:24:08 +1000] StartJob: filterfds[1] = [ 10 -1 ]
I Started filter /usr/lib/cups/filter/pstops (PID 24130) for job 11.
I Started filter /usr/lib/cups/filter/foomatic-rip (PID 24131) for job 11.
I Started backend /usr/lib/cups/backend/smb (PID 24132) for job 11.
E PID 24131 stopped with status 22!
D [Job 11] /usr/lib/cups/filter/foomatic-rip: No such file or directory
D [24/Jul/2004:13:24:08 +1000] CloseClient() 7
[...]


What i dont understand is why is it trying to use foomatic (PID 24131). I haven't got it emerged on my system.

Maybe you should emerge it, see what happens?

CUPS likes Foomatic, it is a very universal filter script. It should be present I think, especially if you use a PPD from linuxprinting.org or anything other than gimp-print or the example drivers from CUPS. Plus it doesn't hurt, it helps!
_________________
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
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Tue Aug 10, 2004 4:04 pm    Post subject: Reply with quote

well, i tried:

Code:
 cupsaddsmb -H keg -h keg -U root -v -a


and the result is the same...


Code:
 root@keg /home/dcorujo # cupsaddsmb -H keg -h keg -U root -v -a Password for root required to access keg via SAMBA:
Running command: smbclient //keg/print\$ -N -U'root%#####' -c 'mkdir W32X86;put /var/spool/cups/tmp/4118ff8acce2d W32X86/HP840C.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=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Password for root required to access keg via SAMBA:
Running command: smbclient //keg/print\$ -N -U'root%' -c 'mkdir W32X86;put /var/spool/cups/tmp/4118ff8acce2d W32X86/HP840C.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=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.5]
tree connect failed: NT_STATUS_WRONG_PASSWORD

ERROR: Unable to copy Windows printer driver files (256)!
 


The first time it complains about NT_STATUS_BAD_NETWORK_NAME, and if I press ENTER when he requests a pass a second time I get NT_STATUS_WRONG_PASSWORD and Unable to copy Windows printer files.

Any ideas?
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


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

PostPosted: Wed Aug 11, 2004 12:51 pm    Post subject: Reply with quote

Did you follow the Howto to the letter (or implemented it at least somehow accuratly?)

Seems to me that there's something wrong with either your Samba setup or some mismatches on the system itself. Do you have DNS set up correctly or do yor have sane entries in /etc/hosts? Hostname correct? Does Samba acutally work? Can you browse shares and copy files around from the Windows client? Can you do a smbclient -U% -L keg? If so, can you do a smbclient -U ANY_SAMBA_USER \\\\keg\\ANY_SHARE_NAME? Does CUPS work?

Please post the output of testparm as well as hostname, your /etc/hosts and have a look at the troubleshooting tips by Kurt Pfeifle.

That's all I can think of for now, you did not provide much information to work with ;)
_________________
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
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Wed Aug 11, 2004 3:09 pm    Post subject: Reply with quote

Hello. Sorry about the lack of info. Any more kind of info you need just tell me (and the way to obtain it would be welcome too, hehe).

I followed your How to almost religiously, hehe.
Well,
Code:
mbclient -U% -L keg
and
Code:
smbclient -U ANY_SAMBA_USER \\\\keg\\ANY_SHARE_NAME
where both succefull, whereas I could look at what were my share names, and I could navigate through them. Cups is working fine at every program I tried... mozilla-thuderbird, openoffice, acroread, etc.
Samba also works, disk-sharing wise.

Here are the outputs you requested:

TESTPARM

Code:
root@keg /home/dcorujo # testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[print$]"
Processing section "[HP840C]"
Processing section "[printers]"
Processing section "[public]"
Processing section "[Musica]"
Processing section "[MCP2K4]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
        server string = Samba Server %v
        interfaces = lo, eth0
        bind interfaces only = Yes
        security = SHARE
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        guest ok = Yes
        hosts allow = 127.0.0.1, 10.10.10.
        hosts deny = 0.0.0.0/0

[print$]
        comment = Printer Drivers
        path = /etc/samba/printer # this path holds the driver structure
        write list = root
        guest ok = No

[HP840C]
        comment = HP DeskJet 840C Network Printer
        path = /var/spool/samba
        printer admin = root
        printable = Yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        printer admin = root
        printable = Yes
        browseable = No

[public]
        comment = Public Files
        path = /home/dcorujo/share
        read only = No
        create mask = 0766

[Musica]
        comment = Music Files
        path = /mnt/fat32/Musica/

[MCP2K4]
        comment = Minho Campus Party 2k4
        path = /mnt/windows/Documents and Settings/Daniel/Desktop/mcp2k4/


HOSTNAME
Code:
root@keg /home/dcorujo # hostname
keg


/ETC/HOSTS
Code:


127.0.0.1 localhost
10.10.10.146 keg.brewery keg

# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


I took a look around Kurt Pfeifle's troubleshooting guide... and I got scared
:oops:

Hope this new info helps![/b]
Back to top
View user's profile Send private message
mold
n00b
n00b


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

PostPosted: Wed Aug 11, 2004 3:21 pm    Post subject: CUPS drivers crash W2K? Reply with quote

Hi

This really sucks...I have definately spent too much time already on this damn stuff :(

The problem:
I want to enable several W2K and XP clients to print on the network, using a Gentoo Server (Samba and CUPS).
I want to make use of the download drivers functionality so that I don't have to manually install the printers everytime another clueless laptop owner needs to use one of the network printers.

What I have done so far:
Read this HOWTO and several others.
Installed Samba, Foomatic, CUPS and the CUPS drivers for Windows (cups-samba).
Set up my printers in CUPS and configured Samba to print via CUPS and to offer the printer download share (created print$ and ran cupsaddsmb).

What works:
I can print locally from the server and I can also print from the Windows clients using IPP.
Also, the clients can print via Samba if I do *not* use the driver download functionality, but instead install the usual Windows drivers locally.
The printers are listed correctly in network neighbourhood. When I try to use the driver download funcionality, Windows seems to download the drivers correctly - it does not complain about missing drivers, installs the printer, and the driver files do appear in the appropriate directories on the Windows machine.

The problem occurs as soon as I try to print from an application:
As soon as I try to print from W2K with the drivers downloaded from Samba, I get a bunch of typically unhelpful Micro$oft error messages (something like 'function address 0x-this-or-that caused a protection error, property pages may not be displayed...'). There is no sign of any connection in any of the server's logfiles, so the print process seems to crash before even any connection to Samba is made.
Interesting: When I print via right-click on printer, properties, print test page, anything works just fine! But I cannot print from e.g. Notepad. The problem seems to occur when Windows tries to display certain printer properties.

I have not yet tried wether the same problem occurs on XP clients, maybe it is limited to W2K.
For me, this seems to bet not a Samba/CUPS configuration problem, but a problem with the CUPS drivers from the cups-samba package.

2 questions:
Is anyone else experiencing this trouble?
Can someone give me detailed instructions on how to use the Adobe drivers? I downloaded them, but after installing them on a Windows machine, I cannot find the files that I am supposed to copy over to the server according to the cupsaddsmb manpage :(
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


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

PostPosted: Wed Aug 11, 2004 4:32 pm    Post subject: Reply with quote

newbie_gentoo: Please set your security parameter to user in your smb.conf global section e.g.
Code:

[global]
  ...
  security = user
  ...

Then try cupsaddsmb again, it should give different output now, or there might be some deeper, more serious flaws :)

mold: The problem you are experiencing indeed seems to be a known bug in the cups-samba drivers. If you read through this thread you'll notice some people reporting the same unhelpful error message only they DO seem to be able to print via Notepad, Acrobat, etc. See here for some details.

Note so self: I need to add a remark about that property box to the guide. I also need a 48-hour-day.

Please see the workaround by matbouch (thanks!), a few post above. I haven't tested it myself though.

And just a blind shot by me: maybe your problem is because several different printer drivers are installed and they conflict somehow with each other? Try deleting all the installed printer drivers (and printers) and connect again (this is always a good idea in Windows).

I think this is done by opening Start -> Settings -> Printers and right-clicking anywhere on the white background, chosing "Server properties". I am not sure, it's now been a while since I've used Windows to print. Theoretically you should be able to print although you wouldn't be able to select any extra options and properties.

HTH...
_________________
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: Wed Aug 11, 2004 7:45 pm    Post subject: Reply with quote

Thx daff, I will try some of the things that were mentioned.
And sorry for not reading the thread well enough. I have put far too many hours into trying to get this thing to work... I am somewhat exhausted by the samba/cups/windows combination at the moment ;)
Back to top
View user's profile Send private message
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Wed Aug 11, 2004 8:41 pm    Post subject: Reply with quote

O darn... i changed security to user, and i still get the same error! :(

EDIT: i also noticed that when cupsaddsmb asks for the password, I get that same mistake EVEN if I put a wrong password! any ideas?
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:44 am    Post subject: Reply with quote

mold: Very understandable :) Windows networking is a nightmare...let's hope for the CUPS guys to resolve the problem.

newbie_gentoo: I am running out of ideas...have you added root to the Samba passwort database by issuing smbpasswd -a root? Don't forget it's the passwort you gave there cupsaddsmb is expecting.

Try also setting netbios name = keg in smb.conf. Leave security = user though. You should also set your workgroup = to something other than just WORKGROUP (no real reason, but it's better :)).

That's all I can think of at the moment, sorry.
_________________
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 10:18 am    Post subject: Reply with quote

This is almost getting funny. I just found out that I in fact *can* print from Firefox, OOo, etc - but not from Notepad. It seems that for some reason Notepad tries to open the printer configuration before printing and that is why it crashes, while other applications do not. I think I should just get the Adobe drivers. Can someone who uses them give me a hint on where to find the correct files?
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 10:56 am    Post subject: Reply with quote

mold wrote:
This is almost getting funny. I just found out that I in fact *can* print from Firefox, OOo, etc - but not from Notepad. It seems that for some reason Notepad tries to open the printer configuration before printing and that is why it crashes, while other applications do not. I think I should just get the Adobe drivers. Can someone who uses them give me a hint on where to find the correct files?

Really interesting :D

Well the Adobe drivers are infact intended for local installation on each client, but I managed to find the correct files after extraction of the archive (seems like years ago).

I have no Windows machine at hand now but you should try downloading and extracting the archive from Adobe (found here) and then use the search function on Windows to locate the files. According to the cupsaddsmb man page they are called ADOBEPS5.DLL, ADOBEPSU.DLL and ADOBEPSU.HLP. See the man page for details on installation/copying (the files need to be all uppercase).

HTH
_________________
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
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Thu Aug 12, 2004 11:13 am    Post subject: Reply with quote

oh boy... same thing... I'm giving up. I'm planning on building a gentoo gateway, and it looks like it is rapidly candidating itself to be a printer server. I hope I can get it working there, hehe. Thanks for all the help, you've been great! :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 1:16 pm    Post subject: Reply with quote

Just wanted to say I installed Gentoo on my main desktop machine at home (which ran FreeBSD for years) two days ago and just now I used my guide to set up Samba and CUPS. I did not ran into a single problem whatsoever!

So the guide should be still accurate and working! Just follow every step carefully and it should work!

I have working DNS setup at home, two entries in /etc/hosts, one for localhost, one for my machine (although the second entry isn't really necessary since a DNS is running). security = user in smb.conf's [global] section, workgroup = ARDA, passdb backend = tdbsam, added users using pdbedit (am going to update the guide for that) and that was it.
_________________
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: 202
Location: Germany

PostPosted: Thu Aug 12, 2004 1:28 pm    Post subject: Reply with quote

Hi, great Howto thank you for this daff...

I got the printer working with cups (locally) and tried now to connect the printer with Windows NT4. I'm getting the error, that the driver (on the Samba Server) could not be installed.
I'm using the cups driver. All commands in your Howto worked.
Here are my config files:

smb.conf:
Code:
[...]
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = printadm,root

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


/etc/cups/printers.conf:

Code:
<DefaultPrinter toshtest>
Info toshtest
DeviceURI socket://184.1.52.26:9100
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>


The files in print$ are:
Code:
# find /var/lib/samba/drivers
/var/lib/samba/drivers
/var/lib/samba/drivers/W32X86
/var/lib/samba/drivers/W32X86/2
/var/lib/samba/drivers/W32X86/2/cupsdrvr.dll
/var/lib/samba/drivers/W32X86/2/toshtest.ppd
/var/lib/samba/drivers/W32X86/2/cupsui.dll
/var/lib/samba/drivers/W32X86/2/cups.hlp


Any ideas?
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:02 pm    Post subject: Reply with quote

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

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)?

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.

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)?

That's the ideas I have for now, hope it helps!
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6 ... 9, 10, 11  Next
Page 5 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