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


Joined: 03 Dec 2004
Posts: 453

PostPosted: Sat Apr 22, 2006 7:03 pm    Post subject: Reply with quote

I get the cupsaddsmb error when trying to get my driver able to download to windows XP:

Quote:
spring drivers # cupsaddsmb -H localhost -U root -a -v
Password for root required to access localhost via SAMBA:
Running command: rpcclient localhost -N -U'root%pont00ns' -c 'setdriver HPDeskJet6122 HPDeskJet6122'
WARNING: The "printer admin" option is deprecated
SetPrinter call failed!


My printer works fine locally (linux print with printer on usb device), but I can't get my XP box to install the driver over samba. It sees the printer, but says "network printer does not have drivers installed"
_________________
Woof, Woof! Add "[solved]" to the title! Woof, Woof!
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Sat Apr 22, 2006 7:26 pm    Post subject: Reply with quote

check out the german utility to install native XP cups printing drivers.

granted it'd be nice if it worked invisibly, but it doesn't. Whatcha gonna do.

BTW if you figure this out I would love to hear how you did it. I think maybe things have changed since this howto began

ps looks like a malformed line in smb.conf
Back to top
View user's profile Send private message
chovy
Guru
Guru


Joined: 03 Dec 2004
Posts: 453

PostPosted: Sun Apr 23, 2006 12:00 am    Post subject: Reply with quote

neurosis wrote:
blibbleage wrote:
theklone wrote:
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.

I've got the same problem, what cups version are you using?
Using cups-1.1.20-r2 here on ~x86 system.


I'm using cups-1.1.21, also on ~x86. Does anyone out there know why this isn't working?

Thanks!


Same problem here. I got it working by looking through the thread at some people who actually had this command work, and by manually executing the commands that cupsaddsmb executes.

ie:

Code:

mkdir /etc/samba/printer/W32X86
(move the .dlls, .hlp, and .ppd to this directory)
Then..
rpcclient hektor -N -U'root%XXXXXX' -c 'adddriver "Windows NT x86" \ "lp:cupsdrv5.dll:lp.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"'


Careful, the 'lp' corresponds to my printer name - yours will be different. Printer is a Samsung ML-1740 and now seems to be working well. At least the Windows clients can auto-install drivers and whatnot :)


I tried installing a new printer (old one worked fine using this method). So I have the old ps* files in /etc/samba/printer/W32X86/3 (you have cups* files though (i choose ps earlier vs. cups method)...anyway, I don't know which ps* file corresponds with the cups* files you used:

the command I ran is:

Code:
rpcclient spring -N -U'root%xxxxxx' -c 'adddriver "Windows NT x86" "HPDeskJet6122:pscript5.dll:HPDeskJet6122.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:NULL"'

which returns:
WARNING: The "printer admin" option is deprecated
result was WERR_BADFILE


I'm about ready to give up, this is killing me and my head hurts :(

The files I have are:

Quote:
spring 3 # pwd
/etc/samba/printer/W32X86/3
spring 3 # ls -l
-rwxr--r-- 1 root root 19048 Jun 18 2005 HPDeskJet3820.ppd
-rw-r--r-- 1 root root 20148 Apr 22 11:13 HPDeskJet6122.ppd
-rw-r--r-- 1 root root 19717 Apr 22 03:32 HPOfficeJet4110.ppd
-rwxr--r-- 1 root root 129024 Jun 18 2005 ps5ui.dll
-rwxr--r-- 1 root root 26038 Jun 18 2005 pscript.hlp
-rwxr--r-- 1 root root 792644 Jun 18 2005 pscript.ntf
-rwxr--r-- 1 root root 455168 Jun 18 2005 pscript5.dll


trying to run this *rpcclient* command.
_________________
Woof, Woof! Add "[solved]" to the title! Woof, Woof!
Back to top
View user's profile Send private message
atdsm
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 118
Location: Pennsylvania

PostPosted: Sun Apr 23, 2006 10:24 pm    Post subject: Reply with quote

Excellent HOWTO! It doesn't work with the brand new CUPS 6.0 windows drivers, though, because some things have changed. I wrote up a bit of an explanation of how to use the CUPS 6.0 windows drivers with Samba, referencing this howto heavily while working.

If you would like to integrate the information into your HOWTO, please do. Or, just direct people to mine...

HOWTO - Samba & CUPS 6.0 Windows Postscript Drivers
_________________
There are 10 kinds of people: those who know binary and those who don't.
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Wed Apr 26, 2006 3:26 am    Post subject: sweet Reply with quote

dear atdsm

props. your howto looks extremely useful.

my fix was to use some german native-windows native-cups drivers, not in my native language but thanks to babelfish clear enough.

but it would be so cool if i didn't have to install on windows boxes.

I look forward to getting this working. Thanks a ton.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
geskorup
n00b
n00b


Joined: 18 May 2006
Posts: 1

PostPosted: Thu May 18, 2006 9:00 am    Post subject: Success! Reply with quote

Damn.. well here's the story.

I'm running FreeBSD and recently I pulled in a new ports tree and updated all of my installed ports, SAMBA, CUPS and everything. That must have toasted some database. So there I was, no settings preserved trying to remember how I got Windows past the.. the server doesn't have the correct drivers installed... blah blah..

cupsaddsmb just wasn't doing it for some reason. So here's what I did..

Pulled all of the printer drivers from my Windows machine installed in c:\windows\system32\spool\drivers\w32x86\3

to my FreeBSD machine's configured drivers path (/usr/local/share/cups/drivers/W32X86/3).

Then finally, skipped cupsaddsmb and modified the command it runs to look like the following..

rpcclient localhost -N -U'root%password' -c 'setdriver laserjet "HP LaserJet 4L"'

Cupsaddsmb would run: rpcclient localhost -N -U'root%password' -c 'setdriver laserjet laserjet'

My printer is a HP LaserJet 4L connected to the parallel port and is called laserjet in /etc/printcap. Windows obviously found the correct driver by the printer model, not the name.

Sometimes you just gotta get things done manually. I hope this will work for others.
Back to top
View user's profile Send private message
Shade_MDK
n00b
n00b


Joined: 17 Jun 2006
Posts: 18

PostPosted: Tue Jul 04, 2006 2:18 pm    Post subject: I'm not sure this is the right place Reply with quote

But...I have a question..
A couple of days ago.. i've installed 2 printers on a gentoo machine..designated to be used by networked windows machines..
Fortunatelly only windows xp, UNfortunatelly 2 versions of ms win, with and without Service pack 2, and
it seems that those machines who have updated windows xp to service pack 2 usually print slower..than those who have only service pack 1 (but i've experienced even sistem jam on winxp sp2!!)
The printers are on a clasic share ..and the story is more complicated..
because one of the 2 printers does not have it's own drivers cause i could't find it anywhere.. (kyocera FS-720) it uses another driver
from another model..
But the problem is with both printers..not only with this one ..
(I should mention that the other one it's an HP 2100 that has drivers..)

I was thinking about IPP but since the local printer driver is not exactly for the installed printer.. it might not work/..

anyone ..?
anything?
Back to top
View user's profile Send private message
atdsm
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 118
Location: Pennsylvania

PostPosted: Thu Jul 06, 2006 2:21 am    Post subject: Reply with quote

I really have no idea there... I'm not a sysadmin by a long shot.
_________________
There are 10 kinds of people: those who know binary and those who don't.
Back to top
View user's profile Send private message
nordi80
n00b
n00b


Joined: 12 Aug 2005
Posts: 12

PostPosted: Wed Jul 19, 2006 11:27 am    Post subject: Reply with quote

I'm using samba to share a local installed printer for Windows-XP users. I have done the manual above, but if I want to connect to the printer with an Windows-XP client I need to select driver because it can't find them. What could be the reason?
Back to top
View user's profile Send private message
Shade_MDK
n00b
n00b


Joined: 17 Jun 2006
Posts: 18

PostPosted: Tue Jul 25, 2006 12:49 pm    Post subject: Try this ..it might work Reply with quote

Install you printer driver on the PC running Windows XP just like you would install the printer locally (actually you will just copy the printer driver in windows )
When you'll browse the network go to the server double click on the shared printer.. and it will say that there are no printer drivers on the remote server you are trying to install,
tell windows that you shall install drivers maually.. (don't install drivers ..I will select them from a list -..i think that's the option) then either browse the printer windows that will appear...and find the previously installed drivers...or browse for the drivers in the place where you have them.
If the printer is installed ok on the linux machine (actually you can make a print test) and the correct drivers are installed on it, it should work fine from windows. at least on windows XP with SP1 installed..I don't know about SP2..i'm having some trouble with it.
There's also IPP printing with cups ..and it might work better..but I haven't tried that yed..as I undestand windows ..is having some problems with ipp ip-s instead of names acces.
Back to top
View user's profile Send private message
KaiNeR
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2004
Posts: 100

PostPosted: Sun Sep 03, 2006 8:10 pm    Post subject: Reply with quote

i'm trying to get my HPDeskjet 5650c printer working on the network, i've been following the gentoo-cups-samba howto and i've got to the point to install the windows drivers
when i enter

cupsaddsmb -H gentoo -U root -h gentoo -v -a

I then enter the password but recieve the following error

Error was NT_STATUS_UNSUCCESSFUL

I'm using the same password as i created for

smbpasswd -a root


can anyone help
Back to top
View user's profile Send private message
oxymoron
n00b
n00b


Joined: 31 Mar 2006
Posts: 4

PostPosted: Sun Sep 10, 2006 5:21 pm    Post subject: Re: Success! Reply with quote

geskorup wrote:
Damn.. well here's the story.

I'm running FreeBSD and recently I pulled in a new ports tree and updated all of my installed ports, SAMBA, CUPS and everything. That must have toasted some database. So there I was, no settings preserved trying to remember how I got Windows past the.. the server doesn't have the correct drivers installed... blah blah..

cupsaddsmb just wasn't doing it for some reason. So here's what I did..

Pulled all of the printer drivers from my Windows machine installed in c:\windows\system32\spool\drivers\w32x86\3

to my FreeBSD machine's configured drivers path (/usr/local/share/cups/drivers/W32X86/3).

Then finally, skipped cupsaddsmb and modified the command it runs to look like the following..

rpcclient localhost -N -U'root%password' -c 'setdriver laserjet "HP LaserJet 4L"'

Cupsaddsmb would run: rpcclient localhost -N -U'root%password' -c 'setdriver laserjet laserjet'

My printer is a HP LaserJet 4L connected to the parallel port and is called laserjet in /etc/printcap. Windows obviously found the correct driver by the printer model, not the name.

Sometimes you just gotta get things done manually. I hope this will work for others.


You are right!!!
I had a same problem but with the name like hp_laserjet_1010_USB_1 and when
i changed it with
Code:
rpcclient localhost -N -U'root%password' -c 'setdriver hp_laserjet_1010_USB_1 "HP LaserJet 1010"'

and did /etc/init.d/samba restart (i don't know if it is necessary ) then there was no more error with not right driver for Win XP client. It just done successful instalation
of the printer.......
Back to top
View user's profile Send private message
Mr.QNo
n00b
n00b


Joined: 21 Mar 2005
Posts: 74

PostPosted: Mon Sep 11, 2006 8:55 pm    Post subject: No drivers in /etc/samba/printer Reply with quote

Dear daff,

great guide :-) I succeeded in most things (clamav works fine, printers are recognized), but there still is one problem.

Code:
multi /etc/samba/printer # cupsaddsmb -v -a
Password for root required to access localhost via SAMBA:
Running command: rpcclient localhost -N -U'root%XXXXXXXX' -c 'setdriver HP4000 HP4000'
Succesfully set HP4000 to driver HP4000.

Running command: rpcclient localhost -N -U'root%XXXXXXXX' -c 'setdriver HPDJ840C HPDJ840C'
Succesfully set HPDJ840C to driver HPDJ840C.


No error message, but also no copy of files to /etc/samba/printer.

What might be wrong here? What additional information is necessary to debug?

TIA
Chris
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Sun Oct 22, 2006 12:26 am    Post subject: Reply with quote

I tried adding my user, but I get this:
Code:

bdm mike # smbpasswd -a mike
New SMB password:
Retype new SMB password:
startsmbfilepwent_internal: file /var/lib/samba/private/smbpasswd did not exist. File successfully created.
Failed to open group mapping database
failed to initialize group mapping
Failed to open account policy database
Failed to open account policy database
Failed to open account policy database
Added user mike.


Any ideas?
_________________
Paludis, the newest and best pkgcore replacement
Back to top
View user's profile Send private message
AddictDesigns
n00b
n00b


Joined: 16 May 2007
Posts: 3

PostPosted: Thu May 17, 2007 10:48 pm    Post subject: Reply with quote

Ok, I'm getting the famous WERR_ACCESS_DENIED error. So any help would be great!


Here is my smb.conf
Code:

[Global]
        unix charset = iso8859-15
        workgroup = realm
        realm = domain
        server string = hostname
        security = ADS
        client schannel = No
        server schannel = No
        password server = password server
        username map = /etc/samba/smbusers
        log level = 3
        log file = /var/log/samba/%m.log
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        preferred master = No
        local master = No
        domain master = No
        wins proxy = Yes
        wins server = wins server
        ldap ssl = no
        idmap uid = 10000-40000
        idmap gid = 10000-40000
        template primary group =
template shell = /bin/bash
        winbind separator = +
        winbind enum users = No
        winbind enum groups = No
        winbind use default domain = Yes
        winbind nested groups = Yes
        printer admin = Printer Admins
        hosts allow = IP addresses that are allowed
        cups options = raw
        load printers = yes
        printing = cups
        printcap name = cups



[printers]
        comment = All Printers
        path = /var/spool/samba
        guest ok = Yes
        printable = Yes
        browseable = No
        write list = Admins
        printer admin = Admins
        use client driver = no

[print$]
        comment = Printer Driver Download Area
        path = /usr/windows_drivers/
        write list = Admins
        create mask = 0755
        browseable = No
        printer admin = Admins


My configuration looks fine from looking through this topic but I'm missing something!

I'm using the rpcclient command and it's setup right. I also got all the driver files in the folder W32X86.


Ok so any help would be great guys, if you need anything else just tell me.
Back to top
View user's profile Send private message
Gruelius
n00b
n00b


Joined: 16 Feb 2007
Posts: 37

PostPosted: Fri May 18, 2007 3:57 am    Post subject: Reply with quote

Ive got a small problem, when printing from windows computers using the Konica Minolta Driver, when i select the printer at the print page of a program (e.g. word or adobe pdf reader) the computer will sieze up and then when i press print it will do it again. I remembered reading that there were some things i should change or else windows and samba + cups will argue and slow things down alot.

Any ideas on what i should look at? printing from my ubuntu system via the IPP address works great.
_________________
My Sever:
X2 3800+ | Asus M2N (Nvidia 430) | 1GB Kingston DDR2 667 | 5*200GB Soft. Raid 5
Back to top
View user's profile Send private message
Skukfas
n00b
n00b


Joined: 21 Aug 2007
Posts: 2
Location: Lisbon, Portugal

PostPosted: Tue Aug 21, 2007 1:20 am    Post subject: finally WERR_ACCESS_DENIED fixed Reply with quote

Hi all,
(First post.. :lol: )

Specially for those, like me, that follow the Gentoo Samba3/CUPS/ClamAV HOWTO, and are having troubles with the WERR_ACCESS_DENIED, try comment the lines:
Quote:
vfs object = vscan-clamav
vscan-clamav: config-file = /etc/samba/vscan-clamav.conf


Worked for me.... after 3 days stuck with this >.<

Also had WERR_INVALID_PRINTER_NAME, but it was pretty easy to fix, just added a path to my [HPDeskjet920C], and restarted samba.

Win.


edit: btw, these posts helped me alot:
https://forums.gentoo.org/viewtopic-p-2364445.html#2364445
https://forums.gentoo.org/viewtopic-p-3276874.html#3276874
Back to top
View user's profile Send private message
MorphiusFaydal
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2003
Posts: 113
Location: West Texas

PostPosted: Thu Aug 23, 2007 7:39 pm    Post subject: Reply with quote

Whenever I do "cupsaddsmb -H localhost -U root -h localhost -v HL-2040" it asks me for my password, which I dutifully enter, then it starts scrolling "No Windows printer drivers are installed!"

I've got foomatic-{db,db-engine,filters} and the cups-windows drivers installed.
_________________
Registered Linux User # 309023

vanilla-sources
XFce 4.4 and GNOME 2.20
Back to top
View user's profile Send private message
Skukfas
n00b
n00b


Joined: 21 Aug 2007
Posts: 2
Location: Lisbon, Portugal

PostPosted: Mon Aug 27, 2007 12:33 pm    Post subject: Reply with quote

i also had that problem


did you try reading this post https://forums.gentoo.org/viewtopic-p-3276874.html#3276874 , "Step 1: Obtain the Microsoft Postscript drivers that CUPS needs "


and Step 3 too... in the end you should have about 7 files:
Quote:

The required Microsoft drivers/files:
* ps5ui.dll
* pscript.hlp
* pscript.ntf
* pscript5.dll

and the CUPS drivers/files:
* cups6.ini
* cupsui6.dll
* cupsps6.dll


in
Quote:
/usr/share/cups/drivers/

_________________
what the hell am i doing?!
Back to top
View user's profile Send private message
weni
n00b
n00b


Joined: 13 Mar 2006
Posts: 33

PostPosted: Mon Aug 27, 2007 4:41 pm    Post subject: Reply with quote

Hello.

I'm trying to migrate old lpd server, to brand new Gentoo server with cups.

On lpd server I have virtual printers configured this way: (/etc/printcap)
Code:
prnt1
    :lp=/dev/null
    :mx=0
    :sd=/path/to/prnt1
prnt2
    :lp=/dev/null
    :mx=0
    :sd=/path/to/prnt2

It works this way: user prints a document to the virtual printer. Lpd server produces 2 txt files and puts them into /path/to/prntx dir. This files can be parsed by some script and some info can by inserted into database.

How should I configure cups, to have the same effect?
Back to top
View user's profile Send private message
stephelton
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 84
Location: Dallas, TX, USA

PostPosted: Fri Jan 25, 2008 8:52 pm    Post subject: Reply with quote

Just thought I'd post the problem I ran in to and my solution.

I had set up the printers, got it shared with a windows machine, and had tried printing many jobs. All would fail and I would find this in my cups log:

Code:
PID 16862 (/usr/libexec/cups/filter/pstoraster) crashed on signal 11!


A long story short, I finally tried messing with the printer options under the windows machine I was trying to print from. It was trying to print at 5760x1440 dpi! Now I knew that this crappy printer wouldn't handle that, so I changed it to something more reasonable -- 720 dpi. Worked like a charm.

To access the printer options, browse to the printer, view its properties, select the General tab, click "Printing Preferences...", Select the "Paper/Quality" tab, click "Advanced..." and you'll find what appear to be the same options found under the cups web interface.

Hope that helps some people!
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Thu Mar 18, 2010 8:37 pm    Post subject: Reply with quote

is this howto relevant nowadays?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Sat Apr 03, 2010 5:56 pm    Post subject: Reply with quote

DaggyStyle wrote:
is this howto relevant nowadays?
Not really, since the official gentoo docs cover pretty much the same stuff. And the official doc was updated with the fact that the windows drivers mentioned in this guide are now in portage itself, though I'm unsure if the drivers work with win7.

http://www.gentoo.org/doc/en/quick-samba-howto.xml
_________________
My political stance/bias
slycordinator != slycoordinator
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Apr 03, 2010 6:43 pm    Post subject: Reply with quote

thanks. will try
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Sat Apr 10, 2010 3:00 am    Post subject: Reply with quote

I was able to make it work, though you'll need some files for generic postscript printer driver from a windows install in addition to the ones mentioned in the above link. And for some reason I couldn't get the cupsaddsmb command to work with the smb.conf supplied in the guide. I used a generic one I found elsewhere and started adding in a couple tweaks to be more like what's in the guide. YMMV.
_________________
My political stance/bias
slycordinator != slycoordinator
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 ... , 9, 10, 11  Next
Page 10 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