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


Joined: 25 Jan 2004
Posts: 194

PostPosted: Sat Dec 11, 2004 5:11 pm    Post subject: Reply with quote

I've tried this tutorial before and it worked like a charm. But now, I wanted to test this by using the MySQL passdb backend. Adding a user is a bit of a pain, because there needs to be a password entry for the user (can't this be avoided?). Also, when updating the drivers, I got busted out. I had to set security = user, to use cupsaddsmb. Does anyone have experience with the MySQL backend for samba?
Back to top
View user's profile Send private message
Nuuul
n00b
n00b


Joined: 05 Mar 2004
Posts: 11
Location: The Netherlands

PostPosted: Sun Dec 12, 2004 2:22 pm    Post subject: Reply with quote

Thanks for this tutorial, really helped me out :)

I did skip/modify a few steps, because I've got a Canon IP 4000 connected via LPT on an Asus WL-500G.
This AP is then in WDS mode with an Asus WL-300G, and that AP is connected to the local switch :roll:
Maybe a bit of nut-topology, but the 500G has a printserver, while the 300G doesn't, ánd the 500G is cheaper in comparision with a seperate printserver :?

I used this command for lpadmin to notify CUPS about it:
lpadmin -p CanonIP4000 -v socket://(ip):1901 -E -m raw

The thing is, you have to upload a custom firmware to the 500G which runs p910nd daemon.
You can download that from http://wl500g.dyndns.org/.

The only thing that doesn't work (as far as I've tried ;) ) is printing from the CUPS server itself.
Back to top
View user's profile Send private message
gemini91
Guru
Guru


Joined: 27 Nov 2003
Posts: 317
Location: Naples, Fl

PostPosted: Mon Dec 13, 2004 10:37 pm    Post subject: Reply with quote

Hello, I've followed this tutorial and some others, but I'm still having problems. The printserver has cups-1.1.22 and samba-3.0.9, it is configured to use a Canon S520 attached by a usb port. It uses the gimp-print driver for the Canon S800 and works fine locally. I can't get to the printer from either Windows or Linux. We will forget windows and just look at linux here.

"smbclient -L shuttle" on the linux client produces :

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
Canon520 Printer Canon S520 Network Printer
public Disk Public Files
IPC$ IPC IPC Service (Samba Server 3.0.9)
ADMIN$ IPC IPC Service (Samba Server 3.0.9)

Server Comment
--------- -------
DON Samba 3.0.9
SHUTTLE Samba Server 3.0.9

Workgroup Masterlpstat
--------- -------
WORKGROUP SHUTTLE
but lpstat -a gives me
lpstat: Unable to connect to server : Success

I am also able to mount the public share and browser it.

Everything says that all you need for a linux client is Servername XXXYY in client.conf and it should work. I don't see the printer anywhere on the client. Any ideas what I am missing?
Back to top
View user's profile Send private message
Parasietje
Apprentice
Apprentice


Joined: 25 Jan 2004
Posts: 194

PostPosted: Sat Dec 18, 2004 8:41 pm    Post subject: Reply with quote

When printing from linux, please remember that you are bypassing the samba server and printing directly to the CUPS server.
So please check /etc/cups/cupsd.conf on the server to see if you are allowed (standard is: very restricted)
Please make sure this works first.
Back to top
View user's profile Send private message
gemini91
Guru
Guru


Joined: 27 Nov 2003
Posts: 317
Location: Naples, Fl

PostPosted: Sun Dec 19, 2004 3:02 pm    Post subject: Reply with quote

Parasietje, thanks very much for the reply. I thought of that after I made the post. The problem was being caused by something stupid I had done. I was changing a file called cups.conf instead of cupsd.conf. Once I got the correct file everything worked. I got the windows machines working by using cups - ipp. Again thanks for the reply. Don
Back to top
View user's profile Send private message
drphibes
Guru
Guru


Joined: 30 Nov 2004
Posts: 432

PostPosted: Sun Dec 26, 2004 5:32 pm    Post subject: Re: HOWTO CUPS+Samba: printing from Windows & Linux Reply with quote

daff wrote:
Installing the Windows printer drivers

Now that the printer should be working it is time to install the drivers for the Windows clients to work. Samba 2.2 introduced this functionality I think. Browsing to the print server in the Network Neighbourhood, right-clicking on the printershare and selecting "connect" downloads the appropriate drivers automagically to the connecting client, avoiding the hassle of manually installing printer drivers locally.


Nice HOWTO up until this section. The instructions should indicate that you can, depending on your set-up, choose to use the client-side Windows ("raw" printing) and completely avoid installing any Windows drivers on the Gentoo box.

I need Cups to print local jobs on the Gentoo box and Samba to serve my HP printer up to a W2K box in the same workgroup. In this case, there is absolutely no need to install Windows drivers on the Gentoo box. You simply serve up the printer with Samba and use the client-side drivers ("raw" printing) from Windows and be done with it. I've done this very successfully with lprng on Slackware and am now migrating to Gentoo and Cups.

doc
Back to top
View user's profile Send private message
monkey89
Guru
Guru


Joined: 08 Mar 2004
Posts: 596

PostPosted: Wed Dec 29, 2004 2:10 am    Post subject: Reply with quote

*Sigh...*

Well, after hours of tinkering, I've gotten this to work pretty well. However, I had to deviate from the howto in certain areas. My cups config remained unchanged from the defaults, and I just got ppd files from http://www.linuxprinting.org and used them to install my printer access from the cups frontend (http://localhost:631), which was painless. Just follow the Printing Howto for details on that. However, it was sharing the printer that proved to be problemsome. Here's my final smb.conf:

Code:
[global]
   workgroup = DNET
   server string = Samba Server %v
   load printers = yes
   printcap name = cups
   printing = cups
   printer admin = root
   log file = /var/log/samba3/log.%m
   max log size = 50
   hosts allow = 127.0.0.1 192.168.1.0/24
   security = share
   guest account = printuser
   guest ok = yes

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

[print$]
   comment = Printer Drivers
   path = /etc/samba/drivers
   browseable = yes
   guest ok = no
   read only = yes
   write list = root


For this to work, create the user printuser with the "useradd printuser" command. I did this since I heard that using samba as the guest account broke things... I haven't tested it with that account, but I see no point. You'll need to make the /etc/samba/drivers directory. Also, be sure to edit the hosts allow line for your network. Mine allows localhost and IPs from my block ( 192.168.1.*).

Now the real tricky issue came up with cupsaddsmb, but it wasn't obvious from an error message. The problem lies in the cups windows drivers. If you haven't noticed, they can't be downloaded from the site, but a quick google can turn up results for the archive. However - upon looking at the source, these drivers don't even work, and the comments in the code refer to a version 6 of the drivers (the latest is 5). Even then, from my limited experience, I don't think the code will even use these drivers. Therefore, while this may change in later versions w/ the release of the version 6 drivers, you'll have to use the Adobe Postscript drivers.

Once again, it took some searching to find what I needed, but eventually I found it in an .EXE archive. Here's the link:

http://www.activepdf.com/altdownloads/updates/aps5eng.exe

You don't need windows to unpack it; just emerge unzip if you don't already have it and run "unzip aps5eng.exe". This will create some junk along with two folders, win95 and nt40x86. The 95/98/ME drivers are in the Win95 folder. You'll need the following files renamed as said copied to the /usr/share/cups/drivers folder:

adfonts.mfm -> ADFONTS.MFM
ADOBEPS4.DRV
ADOBEPS4.HLP
defprtr2.ppd -> DEFPRTR2.PPD
ICONLIB.DLL
PSMON.DLL

To print with a WinNT/2K/XP client, go to the nt40x86 directory. You'll need (in /usr/share/cup/drivers)

AdobePSu.dll -> ps5ui.dll
ADOBEPSU.HLP -> pscript.hlp
AdobePS5.nft -> pscript.ntf
AdobePS5.dll -> pscript5.dll

Once these files are copied over, you're almost ready to do cupsaddsmb. Verify that /etc/samba/drivers exists and the correlating entries are in /etc/samba/smf.conf. Then, temporarily change security from share to user for the time being. Make sure root is in the smb password database with:

Code:
smbpasswd -a root


Then do the cupsaddsmb command mentioned in the manual with localhost instead of PrintServer, and it should work. Be sure to change security back to share when finished. Let me know if I forgot something, since it took a lot of work to get this far and I'm sure I left something important out.

-Monkey
Back to top
View user's profile Send private message
iverasp
n00b
n00b


Joined: 11 Oct 2004
Posts: 58

PostPosted: Wed Dec 29, 2004 12:57 pm    Post subject: Reply with quote

When trying to print a test page through the cups web interface, it says:

Code:
Description: Samsung-ML-1750
Location:
Printer State: idle, accepting jobs.
"Media tray empty!"
Device URI: usb:/dev/usb/lp0


I've filled it up with paper, and everything seems okey (all the lights are green). Anyone?

thanks
Back to top
View user's profile Send private message
drphibes
Guru
Guru


Joined: 30 Nov 2004
Posts: 432

PostPosted: Wed Dec 29, 2004 4:49 pm    Post subject: Reply with quote

monkey89 wrote:
The problem lies in the cups windows drivers.

Why are you using the Windows drivers at all? If your Windows machine has drivers for your Samsung printer, you can simplify dramatically. Pretend for a second the printer was plugged directly into your Windows machine. Would you be able to install it with the ususal Add Printer, Select driver procedure? If yes, there's no need to install any Windows/Adobe drivers on the Linux box. The only reason you might need those drivers would be to drive a printer that is spooled and served from Windows itself.

Here's what I did:
  1. Forget Samba completely for a second.
  2. Emerge cups and set up the printer for local linux-based printing with cups. To do this for my HP DeskJet, I used the linuxprinting.org database. It recommened the pcl3 and foomatic-rip combo. Fine. I downloaded and installed the .ppd file into the cups ../model directory. Emerge foomatic. You don't need to emerge hpijs unless you have specific reason to do so. I didn't need it.
  3. Now lpadmin to create the printer. Done.
  4. Now concentrate on the cupsd.conf file. I disagree with the HOWTO on the matter of broadcasting. Turn broadcasting/browsing off unless your cups installation is to operate as a peer in a cups network. If you're installing cups on one machine only, there no need for it to emit any broadcast noise at all.
  5. I had no browser yet installed on the linux machine, so my focus at this point was to enable remote administration in cupsd.conf, so that I could point the browser of another machine in my network to the cups port on the print server and set up any remaining printer config details, i.e. easily with the cups web interface for the HP printer.
    Code:
    <Location /admin>
    #
    # You definitely will want to limit access to the administration functions.
    # The default configuration requires a local connection from a user who
    # is a member of the system group to do any admin tasks.  You can change
    # the group name using the SystemGroup directive.
    #

    AuthType Basic
    AuthClass System

    ## Restrict access to local domain
    Order Deny,Allow
    Deny From All
    Allow From 127.0.0.1
    Allow From 192.168.0.*

    #Encryption Required
    </Location>
    Configure printer settings look good. Print a test page. Looks good.
  6. Now samba. Keep it simple. Like anyone else, I use samba to serve up hard drive and printer shares from my linux machine to my Windows machines. I also use it in conjunction with autofs, so I can on-the-fly mount drive shares served by Windows (i.e. bi-directional sharing, but that is a digression). Now, all I need to do with samba is create a section for my specific printer and tell samba it's a RAW queue whose jobs require NO DRIVER HANDLING. I also want to incorporate all the Windows-specific print queue functionality for submitting a print job, canceling it, getting printer status (ready, paused, etc,), pause/resume job, pause/resume queue, etc. The HOWTO mentions the two mime files in /etc/cups and editing the octet-stream lines. Leave them alone. You don't need to edit them. Instead, merely tell samba directly to raw print as follows (my /etc/samba/smb.conf).
    Code:
     [global]
       netbios name = PORTHOS
       workgroup = WORKGROUP
       server string = Samba Server %v
       hosts allow = 192.168.0.0/255.255.255.0 127.0.0.1 EXCEPT 192.168.0.1
       hosts deny = ALL
       log level = 0
       log file = /var/log/samba/log.%m
       max log size = 50
       security = user
       socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
       dns proxy = no
       wins support = no
       local master = no
       smb passwd file = /etc/samba/smbpasswd
       username map = /etc/samba/smbusers
       encrypt passwords = yes

       ; printing
       printing  = cups
       load printers = no
       show add printer wizard = no
       
       ; default perms are strict
       read only = yes
       browseable = no
       writeable = no
       printable  = no

    [share1]
       comment = "porthos:/share1"
       path = /share1
       read only = no
       browseable = yes
       writable = yes
       user = /etc/samba/smbusers
       write list = /etc/samba/smbusers

    #[share2]
    #   ... etc.
    #[share3}
    #   ....etc.

    [HPDeskJet520]
       comment = HP DeskJet 520
       path = /var/spool/samba
       create mask = 0644
       browseable = yes
       writable = no
       printable = yes
       print command = /usr/bin/lpr -r -P %p -l %s
       lpq command = /usr/bin/lpq -P %p
       lprm command = /usr/bin/lprm -P %p %j
       lppause command = /usr/bin/lp -i %p-%j -H hold
       lpresume command = /usr/bin/lp -i %p-%j -H resume
       queuepause command = /usr/bin/disable %p
       queueresume command = /usr/bin/enable %p
       use client driver = Yes
    You can use lpr or lp for your print command, it doesn't matter. I chose lpr because of the "remove" after printing flag (-r), but that too doesn't matter because that behavior is determined by the cupsd.conf file. What does matter is the lpr -l flag, which is equivalent to -o raw. That tells cups that the data stream is raw and ready for printing with no local driver handling at all. Just queue it up and print it. The "use client driver = yes" is the samba directive for W2K/WinNT clients to use their own driver. Notice too the other specific print commands that enable you to manipulate the printer queue using the Windows printer tools.
  7. Setup samba authentication. I use the smbusers file and smbpasswd to encrypt and store each remote users passwd. I suppose there may be other authentication techniques. This one works for me.
  8. Restart samba. You should see the printer share in your Windows Net Neighborhood now, but it's not ready for use yet. Use the Add Printer wizard to add a network printer, browsing over to that printer share. Select the driver with the customary Windows manufacturer/model dialog.
  9. You're ready to print.

doc
Back to top
View user's profile Send private message
steve_d555
Guru
Guru


Joined: 07 Nov 2004
Posts: 458
Location: Belmont, Massachusetts

PostPosted: Sun Jan 09, 2005 10:47 pm    Post subject: Reply with quote

Hi,
I just tried to do this and have had some success but I still cannot print from my WinXp box. Whenever I try to connect it says there is no drivers.
There are one thing that might be the cause.
Whenever I run my cupsaddsmb command this is all of my output:
Quote:

# cupsaddsmb -H gentoobox -U root -h gentoobox -v HPDeskJet5650
Password for root required to access gentoobox via SAMBA:
Running command: rpcclient gentoobox -N -U'root%******' -c 'setdriver HPDeskJet5650 HPDeskJet5650'
Succesfully set HPDeskJet5650 to driver HPDeskJet5650.


I dont know, I dont seem to get the full output. Where did you guys install the dlls? I installed them in /usr/share/cups/drivers and /usr/local/share/cups/drivers/ ??

Thank you
--Steve


Last edited by steve_d555 on Sun Jun 19, 2005 5:54 am; edited 1 time in total
Back to top
View user's profile Send private message
steve_d555
Guru
Guru


Joined: 07 Nov 2004
Posts: 458
Location: Belmont, Massachusetts

PostPosted: Mon Jan 10, 2005 3:32 pm    Post subject: Reply with quote

Nevermind,
I just installed the HP windows drivers and it worked, and I can now print from windows. Thank you for this excellent guide.

--Steve
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 425

PostPosted: Mon Jan 10, 2005 7:53 pm    Post subject: Reply with quote

I'm using cups here to print on my home network. In fact, there is one machine running Windows. Wasn't there some way to print on a cups-printer (local connected to a linux-machine) without having samba installed? I remember that I once did that, I printed somehow to http://foobar:631/printers/myprinter, but can't remember the exact settings and drivers I had to use on that machine :( Anybody knows a howto for that? All you can find is using samba, but I don't want to install that just for printing.
Back to top
View user's profile Send private message
krader
n00b
n00b


Joined: 19 Jul 2004
Posts: 7
Location: /Spain/Valladolid

PostPosted: Tue Jan 11, 2005 9:13 pm    Post subject: Really strange problem Reply with quote

I have samba and cups configured to allow a Windows XP machine to connect to my linux one, and I can add the printer from Windows directly from the local network (via Samba), or using http://X.X.X.X:631/printers/HPDESKJET720C (now, you know my printer). I can access everything, but, when I print anything from windows, it sends the data to the linux machine, but the printer doesn't do anything. I've used tcpdump to capture the network traffic to see if there is traffic exange, and it exists, whith all the data and ACKs. So here is my question:
¿Why cannot I print from windows via or not via Samba?

When I were a Mandrake user, I configure cups to allow to print directly to the address before, and it worked, so I think it should be something mandrake did but gentoo doesn't.
I need an answer, my brother need to print some documents
Back to top
View user's profile Send private message
lodder_
Apprentice
Apprentice


Joined: 06 Nov 2004
Posts: 162
Location: Knokke-Heist, Belgium

PostPosted: Thu Jan 13, 2005 12:25 pm    Post subject: Reply with quote

I have used this tutorial to install samba, but when i want to use the printer in windows i get the error:

Code:
there are incorrect drivers installed on the server


this is the error i get when i want to do the cupsaddsmb
Code:
cupsaddsmb -H cerberus -U root -h pandora -v Epson
Password for root required to access cerberus via SAMBA:
Running command: rpcclient cerberus -N -U'root%fl3085' -c 'setdriver Epson Epson'
cli_nt_session_open: cli_nt_create failed on pipe \spoolss to machine cerberus.  Error was NT_STATUS_OBJECT_NAME_NOT_FOUND
Could not initialise \PIPE\spoolss

Password for root required to access cerberus via SAMBA:




plz help me solve this problem

ps my print server is not my samba server but in linux i can print with the samba server.
Back to top
View user's profile Send private message
joris-fr
n00b
n00b


Joined: 10 Jan 2005
Posts: 15

PostPosted: Mon Jan 24, 2005 3:47 pm    Post subject: Reply with quote

///lodder\\\ wrote:
I have used this tutorial to install samba, but when i want to use the printer in windows i get the error:

Code:
there are incorrect drivers installed on the server


this is the error i get when i want to do the cupsaddsmb
Code:
cupsaddsmb -H cerberus -U root -h pandora -v Epson
Password for root required to access cerberus via SAMBA:
Running command: rpcclient cerberus -N -U'root%fl3085' -c 'setdriver Epson Epson'
cli_nt_session_open: cli_nt_create failed on pipe \spoolss to machine cerberus.  Error was NT_STATUS_OBJECT_NAME_NOT_FOUND
Could not initialise \PIPE\spoolss

Password for root required to access cerberus via SAMBA:




plz help me solve this problem

ps my print server is not my samba server but in linux i can print with the samba server.


Spoolss or Spools ??


I have too a problem : I can print directly from Linux, but I can't print via Samba.
I followed the tutorial, beside I have a Dell 1700n and I have no clue where I can get the PPD file :?: :?:
Back to top
View user's profile Send private message
soroh6
Apprentice
Apprentice


Joined: 07 Nov 2002
Posts: 231

PostPosted: Wed Jan 26, 2005 2:27 am    Post subject: Reply with quote

The only real problems that I think I was having was that Client for Microsoft Networks wasn't clicked on my Windows device.

Other than that.. I'm re-configuring cups at the moment.

HTH.
_________________
:: soroh -*~
Back to top
View user's profile Send private message
sobers_2002
Veteran
Veteran


Joined: 16 Mar 2004
Posts: 1128

PostPosted: Thu Feb 17, 2005 2:06 pm    Post subject: Reply with quote

could some1 lemme know how to make user specific print logs???

as in i want that at the end of month i should have a nice
printable file showing which user printer how many docs.....also
what is needed is that all docs that could not be printed should
not be added to the user .....like he pressed print but due to some
error it didn;t get printed so it should no be added.
_________________
Pdict - dockable dictionary client for linux
FREE97WIN: Use this code on Dreamhost and you get $97 off !!
Back to top
View user's profile Send private message
blubbi
Guru
Guru


Joined: 27 Apr 2003
Posts: 545
Location: Halle (Saale), Germany

PostPosted: Tue Mar 08, 2005 10:37 pm    Post subject: Reply with quote

Okay, I got every thin up and running, the only problem are the drivers for windows....
Everytime I try to add the drivers I get the following output:

Quote:

root@ws1-iut $ cupsaddsmb -H ws1-iut -U root -h ws1-iut.medizin.uni-halle.de -v -a
Password for root required to access ws1-iut via SAMBA:
Running command: rpcclient ws1-iut -N -U'root%###' -c 'setdriver HPD930C HPD930C'
Succesfully set HPD930C to driver HPD930C.

Running command: rpcclient ws1-iut -N -U'root%###' -c 'setdriver HPL2300 HPL2300'
Succesfully set HPL2300 to driver HPL2300.

Running command: rpcclient ws1-iut -N -U'root%###' -c 'setdriver HPL4M HPL4M'
Succesfully set HPL4M to driver HPL4M.


but al ls -lah /etc/samba/printer/

Quote:

root@ws1-iut $ ls -lah /etc/samba/printer/
total 8.0K
drwxr-x--x 2 root root 4.0K Mar 8 20:24 .
drwxr-xr-x 3 root root 4.0K Mar 8 23:13 ..


Does anyone have a clou where I mad a mistake?

ls -la /usr/local/share/cups/drivers/
Quote:

root@ws1-iut $ ls -lah /usr/local/share/cups/drivers/
total 524
drwxrwxr-x 2 root root 4096 Mar 8 23:31 .
drwxr-xr-x 10 root root 4096 Mar 8 22:54 ..
-r--r--r-- 1 root root 14234 Sep 24 2002 cups5.hlp
-r--r--r-- 1 root root 280268 Jan 3 2004 cupsdrv5.dll
-r--r--r-- 1 root root 219540 Jan 3 2004 cupsui5.dll


ls -la /usr/share/cups/drivers/
Quote:

root@ws1-iut $ ls -la /usr/share/cups/drivers/
total 524
drwxrwxr-x 2 root root 4096 Mar 8 23:31 .
drwxr-xr-x 10 root root 4096 Mar 8 22:54 ..
-r--r--r-- 1 root root 14234 Sep 24 2002 cups5.hlp
-r--r--r-- 1 root root 280268 Jan 3 2004 cupsdrv5.dll
-r--r--r-- 1 root root 219540 Jan 3 2004 cupsui5.dll


here's my smp.conf file:
Quote:

[global]
dos charset = 850
unix charset = ISO8859-15
workgroup = UTOX
server string = Samba Server %v
interfaces = eth2, 141.48.106.103/255.255.255.0
bind interfaces only = Yes
passdb backend = tdbsam
guest account = guest
passwd chat debug = Yes
log file = /var/log/samba3/log.%m
max log size = 50
debug hires timestamp = Yes
name resolve order = wins lmhosts bcast
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
add user script = /usr/sbin/useradd -s /bin/false '%u'
delete user script = /usr/sbin/userdel '%s'
add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/bin/gpasswd -a '%u' '%g'
delete user from group script = /usr/bin/gpasswd -d '%u' '%g'
set primary group script = /usr/sbin/usermod -g '%g' '%u'
add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M
logon script = logon.cmd
logon path = \\%N\Profiles\%U
logon drive = X:
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
dns proxy = No
ldap ssl = no
message command = /usr/bin/linpopup
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind separator = #
winbind use default domain = Yes
vscan-clamav:config-file = /etc/samba/vscan-clamav.conf
printer admin = root
create mask = 0666
force directory mode = 0755
vfs objects = vscan-clamav

[----Snipped the shares and logon shares----]

[print$]
comment = Printer Drivers
path = /etc/samba/printer
write list = root

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


So any ideas?
_________________
-->Please add [solved] to the initial post's subject line if you feel your problem is resolved.
-->Help answer the unanswered

http://olausson.de
Back to top
View user's profile Send private message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 500
Location: Long Island, NY

PostPosted: Fri Mar 11, 2005 3:51 pm    Post subject: Reply with quote

Sorry to butt in real quick, but when I print from a windows machine using openoffice and the document contains pictures (as well as words) only one picture will print out.
Quote:
application/octet-stream
is uncommented in mime.types and
Quote:
application/octet-stream application/vnd.cups-raw 0 -
uncommented in mime.convs 'cause I thought that might be the problem. The drivers installed on the windows computers were taken from the printer website and are the most up to date windows drivers. All other printing seems to have worked perfectly until this incident. Although openoffice has never had to print a document with both pictures and text until now.
_________________
- Mike A. Leonetti
Back to top
View user's profile Send private message
jerrybme
n00b
n00b


Joined: 15 Sep 2004
Posts: 61

PostPosted: Mon Mar 21, 2005 2:06 pm    Post subject: problems getting samba to work Reply with quote

Hi all:
I've been trying for several days to get this to work. Searched my little fingers to the bone, but no luck so far. I've got CUPS working fine from my linux box, but am trying to share the printer attached to it to the winblows machines on my wireless network (all XP). I've followed the How-to at the begining of this thread. When I try to add a user I get an error
Code:
Failed to open account policy database

This happens when I try with smbpasswd or pdbedit commands.

Here's my smb.config file

Code:
[global]
  netbios name = tuxbox
  workgroup = WORKGROUP    # set your windows network
  #workgroup workgroup
  server string = Samba Server %v
  load printers = yes
  browseable = yes
  printing = cups               # tell samba that we'd like CUPS for printing
  printcap name = cups
  encrypt passwords = yes
  lock directory = /usr/local/samba/var/lock
  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
 # interfaces = eth0             # the interface to the local network
  security = user
   passdb backend = tdbsam
   hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0
 
  [print$]
  comment = Printer Drivers
  # this path holds the driver structure
  path = /etc/samba/printer
  guest ok = no
  browseable = yes
  read only = yes
  # add a username to the write list
  # if you don't want root to be the only
  # printer admin
  write list = username,root
 
  [Epson-C80] # the name is arbitrary, but should be consistent throughout
                # Samba and CUPS!
  comment = Epson C80 Printer
  #printable = yes
  #path = /var/spool/samba
  public = yes
  guest ok = yes
  print command= /usr/bin/lpr -r -P %p -l %s
   path = /var/spool/samba
   create mask = 0644
   browseable = yes
   writable = no
   printable = yes
   print command = /usr/bin/lpr -r -P %p -l %s
   lpq command = /usr/bin/lpq -P %p
   lprm command = /usr/bin/lprm -P %p %j
   lppause command = /usr/bin/lp -i %p-%j -H hold
   lpresume command = /usr/bin/lp -i %p-%j -H resume
   queuepause command = /usr/bin/disable %p
   queueresume command = /usr/bin/enable %p
   use client driver = Yes
   
  printer admin = printer_username,root

[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
Back to top
View user's profile Send private message
jerrybme
n00b
n00b


Joined: 15 Sep 2004
Posts: 61

PostPosted: Wed Mar 23, 2005 11:13 pm    Post subject: Re: problems getting samba to work Reply with quote

jerrybme wrote:
Hi all:
I've been trying for several days to get this to work. Searched my little fingers to the bone, but no luck so far. I've got CUPS working fine from my linux box, but am trying to share the printer attached to it to the winblows machines on my wireless network (all XP). I've followed the How-to at the begining of this thread. When I try to add a user I get an error
Code:
Failed to open account policy database

This happens when I try with smbpasswd or pdbedit commands.



Well, I finally muddled through this one, although still not sure what was wrong with the smb.conf above. I solved this by ditching my current smb.conf and started over with the smb.cong.example and edited to fit my situation. When I restarted Samba it worked fine. And I was able to add user.
Back to top
View user's profile Send private message
spaceturtle
n00b
n00b


Joined: 21 Nov 2003
Posts: 34

PostPosted: Wed Mar 30, 2005 4:28 am    Post subject: Reply with quote

I have followed the guide, and I think everything works until I get to the windows driver section. I issue the command:
Code:
cupsaddsmb -H Gentoo-print -U root -h Gentoo-print -v -a

This gives me no output, just puts me at another prompt.

If I try
Code:
 cupsaddsmb -H Gentoo-print -U root -h Gentoo-print -v DeskJet895Cxi

I get the output:
Code:
cupsaddsmb: Unable to connect to server "Gentoo-print" for DeskJet895Cxi - Success


On the windows machine, they cannot connect to //PrintServer like the guide says, and when they add a network printer, they see a computer called GENTOO (obviously me) but no printer attached to it.

What do I do?
Back to top
View user's profile Send private message
gatiba
Guru
Guru


Joined: 01 Sep 2002
Posts: 434

PostPosted: Thu Mar 31, 2005 8:33 am    Post subject: Re: Really strange problem Reply with quote

krader wrote:
I have samba and cups configured to allow a Windows XP machine to connect to my linux one, and I can add the printer from Windows directly from the local network (via Samba), or using http://X.X.X.X:631/printers/HPDESKJET720C (now, you know my printer). I can access everything, but, when I print anything from windows, it sends the data to the linux machine, but the printer doesn't do anything. I've used tcpdump to capture the network traffic to see if there is traffic exange, and it exists, whith all the data and ACKs. So here is my question:
¿Why cannot I print from windows via or not via Samba?

When I were a Mandrake user, I configure cups to allow to print directly to the address before, and it worked, so I think it should be something mandrake did but gentoo doesn't.
I need an answer, my brother need to print some documents


I have the same exact problem!
Anyone helps?

My smb.conf:

Code:

[global]
   log file = /var/log/samba3/log.%m
   load printers = yes
   smb passwd file = /etc/samba/private/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   map to guest = bad user
   encrypt passwords = yes
   printer admin = @adm
   dns proxy = no
   netbios name = ZEUS
   printing = cups
   server string = Samba Server %v
   workgroup = UFFICIO
   os level = 20
   printcap name = cups
   security = user
   max log size = 50

[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[printers]
   lpq command = /usr/bin/lpq -P %p
   public = yes
   lprm command = /usr/bin/lprm -P %p %j
   allow hosts = 127.0.0.1 192.168.2.*
   use client driver = yes
   browseable = no
   printable = yes
   print command = /usr/bin/lpr -r -P %p -l %s
   lpresume command = /usr/bin/lp -i %p-%j -H resume
   path = /var/spool/samba
   queuepause command = /usr/bin/disable %p
   comment = All Printers
   lppause command = /usr/bin/lp -i %p-%j -H hold
   queueresume command = /usr/bin/enable %p
   create mode = 0700

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

Back to top
View user's profile Send private message
j79zlr
Apprentice
Apprentice


Joined: 05 Dec 2004
Posts: 235
Location: Chicago, IL

PostPosted: Fri Apr 01, 2005 10:45 pm    Post subject: Reply with quote

For the cupsaddsmb problem, run the rpcclient command manually, I have an example here:

http://forums.gentoo.org/viewtopic-t-277315-highlight-cupsaddsmb.html

This really should get filed as a bug.
Back to top
View user's profile Send private message
spaceturtle
n00b
n00b


Joined: 21 Nov 2003
Posts: 34

PostPosted: Tue Apr 05, 2005 5:20 am    Post subject: Reply with quote

I tried to manually add the driver. I got this error:

Code:
gentoo turtle # rpcclient localhost -N -U'root%thisistheend' -c 'adddriver "Windows NT x86" "DeskJet895Cxi:cupsdrv5.dll:hp845c.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"'
WARNING: The "write cache size" option is deprecated
Error connecting to 127.0.0.1 (Connection refused)
cli_full_connection: failed to connect to LOCALHOST<20> (127.0.0.1)
Cannot connect to server.  Error was NT_STATUS_UNSUCCESSFUL


I dont know what server it expects to connect to (if it isnt 127.0.0.1). Any ideas?

Thanks.
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 ... 7, 8, 9, 10, 11  Next
Page 8 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